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

netVisual_circle plotting issue #659

Open
koksiongang opened this issue Aug 4, 2023 · 3 comments
Open

netVisual_circle plotting issue #659

koksiongang opened this issue Aug 4, 2023 · 3 comments

Comments

@koksiongang
Copy link

I'm having some issue with plotting using the netVisual_circle for separate interaction strengths of different samples. I'm using the code from the tutorial

interact_num_diff

@sqjin
Copy link
Owner

sqjin commented Aug 5, 2023

@koksiongang This is related with the maximum width parameter. Do you have this issue when running the example dataset?

@koksiongang
Copy link
Author

koksiongang commented Aug 5, 2023

I don't recall changing that particular parameter. The code from the tutorial is:

mat <- cellchat@net$weight
par(mfrow = c(2,4), xpd=TRUE)
for (i in 1:nrow(mat)) {
mat2 <- matrix(0, nrow = nrow(mat), ncol = ncol(mat), dimnames = dimnames(mat))
mat2[i, ] <- mat[i, ]
p1 <- netVisual_circle(mat2, vertex.weight = groupSize, weight.scale = T, edge.weight.max = max(mat), title.name = rownames(mat)[i])
}

And then I print p1 to save it (pdf() followed by print())

@koksiongang
Copy link
Author

koksiongang commented Aug 7, 2023

It looks fine:
image

On the other hand, I get rather large arrow heads for the combined plot:
weight

Is there a way to direct the plot only to an object to save and not appear on the plotting pane? I've mainly worked with ggplot and am not familiar with the plotting object returned by CellChat.

Edit
Been doing some further testing. It seems to give a more reasonable looking plot now with my own data as well, BUT it seems that by resizing the plotting pane, the thickness of the arrows being plotted get affected. This makes the whole plotting inconsistent across sessions.

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