Skip to content

igraph plot with NA labels for edges #14

@marcosmolla

Description

@marcosmolla

Hi,
I ran into an issue with igraph in combination with cowplot.

I tried to plot a simple igraph network and found that there were NA labels added along the network edges. I first filed this under the cowplot package (see this issue here), but @clauswilke recommend to file it here. Any recommendations?

Thanks everyone!!

Here is my code example:

library(igraph)
library(cowplot)
net<- graph_from_literal(A-B, A-C, A-D,
                         B-E,B-F,
                         C-G,G-H)

net_plot <- ~{
  par(mar=c(0,0,0,0)+.1)
  plot(net, vertex.label.color="white", layout=layout_as_tree(net,root=1), edge.color="black", margin=c(0,0,0,0))
}

save_plot(ggdraw(net_plot), filename="~/Desktop/tst.pdf",base_height=5, base_width=6)```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions