Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

title.name doesn't work in netVisual_circle #670

Open
huipan1973 opened this issue Aug 11, 2023 · 1 comment
Open

title.name doesn't work in netVisual_circle #670

huipan1973 opened this issue Aug 11, 2023 · 1 comment

Comments

@huipan1973
Copy link

It was working before. Now it doesn't show the title. Probably it is because of the update of dependent packages.

netVisual_circle(cellchat@net$count, vertex.weight = groupSize, weight.scale = TRUE, label.edge= FALSE, title.name = "Number of interactions")

The plot doesn't show "umber of interactions".

@ycl6
Copy link

ycl6 commented Sep 7, 2023

Hi @huipan1973

When netVisual_circle builds the plot object, title.name was appended after plot() event has happened. When actually showing the figure, plotting is clipped to the plot region (default is par(xpd = FALSE)), hence title is clipped out.

We need to explicitly set par(xpd = TRUE) so that plotting is clipped to the figure region (i.e. that also includes title).

par(xpd = TRUE)
netVisual_circle(cellchat@net$count, vertex.weight = groupSize, weight.scale = TRUE, label.edge = FALSE, 
                 title.name = "Number of interactions")

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants