CellChat icon indicating copy to clipboard operation
CellChat copied to clipboard

Error in .Call.graphics(C_palette, value) : invalid graphics state >

Open GouQiao opened this issue 4 years ago • 2 comments

Hi Sqjin,

I am doing comparison of multiple cellchat dataset. For each, i finished running to cellchat <- netAnalysis_computeCentrality(cellchat, slot.name = "netP"). And I did as following: object.list <- list(normal = cell.chat.normal, tumor = cell.chat.tumor) cellchat <- mergeCellChat(object.list, add.names = names(object.list))

gg1 <- compareInteractions(cellchat, show.legend = F, group = c(1,2)) gg2 <- compareInteractions(cellchat, show.legend = F, group = c(1,2), measure = "weight") gg1 + gg2

However, I got error: Error in .Call.graphics(C_palette, value) : invalid graphics state

Do you know how to solve this?

Best. Q

GouQiao avatar Sep 14 '21 09:09 GouQiao

@GouQiao This is unexpected. Is there any issue if you simply run compareInteractions(cellchat)

sqjin avatar Sep 21 '21 21:09 sqjin

Hi Sqjin,

I am doing comparison of multiple cellchat dataset. For each, i finished running to cellchat <- netAnalysis_computeCentrality(cellchat, slot.name = "netP"). And I did as following: object.list <- list(normal = cell.chat.normal, tumor = cell.chat.tumor) cellchat <- mergeCellChat(object.list, add.names = names(object.list))

gg1 <- compareInteractions(cellchat, show.legend = F, group = c(1,2)) gg2 <- compareInteractions(cellchat, show.legend = F, group = c(1,2), measure = "weight") gg1 + gg2

However, I got error: Error in .Call.graphics(C_palette, value) : invalid graphics state

Do you know how to solve this?

Best. Q

The cause of this accident may be that the plot area of your Rstudio is too small, you can expand the plot area and plot.

ljy-sys avatar Sep 13 '23 06:09 ljy-sys