Skip to content

Plotting issues in netVisual_circle / netVisual_individual and hierarchy layout (self-loop orientation & tiny nodes) #443

@songflowerr

Description

@songflowerr

Hi jinworks!
I’m experiencing a couple of plotting issues when using CellChat visualization functions, and I’m not sure whether this is an environment-related bug (e.g., igraph/graphics device) or something in the plotting code. I’d really appreciate your guidance.

  1. netVisual_circle() / netVisual_individual() self-loop arcs appear flipped (upside-down)

When I draw the circle plot, the self-loop arcs are rendered in an unexpected orientation (they look “vertically flipped” compared to what I would normally expect). The same issue appears in netVisual_individual().

Code:

P <- netVisual_circle(
cellchat@net$count,
vertex.weight = groupSize, # node size proportional to cell number
weight.scale = TRUE, # scale edge weights to edge width
label.edge = FALSE,
title.name = "Number of interactions"
)

Screenshot:

Image
  1. Hierarchy plot: filled/open circles and arrowheads are extremely small (almost a dot)

In the hierarchy plot, the filled circles, open circles, and arrowheads are nearly collapsed into a dot. Adjusting vertex.size.max does not fix it—it only rescales the overall figure rather than making these elements readable.

Screenshot:

Image

Session information

ggplot2: 4.0.2

igraph: 2.2.1

(If you’d like, I can also provide full sessionInfo() output and the CellChat version.)

Questions

Is the self-loop orientation issue a known bug (possibly related to igraph plotting defaults or device coordinates)?

For the hierarchy plot, is there a parameter or recommended approach to control the size of the filled/open circles and arrowheads independently (not just global scaling)?

If this is version-specific, are there known compatible versions of igraph / ggplot2 that avoid these issues?

Thank you very much for your time and for maintaining CellChat.

Best regards,
Songflower

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions