Closed marcosmolla closed 5 years ago
This is a bug in the gridGraphics package. I suggest you file a bug report there.
library(igraph)
#>
#> Attaching package: 'igraph'
#> The following objects are masked from 'package:stats':
#>
#> decompose, spectrum
#> The following object is masked from 'package:base':
#>
#> union
net<- graph_from_literal(A-B, A-C, A-D,
B-E,B-F,
C-G,G-H)
net_plot <- function() {
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))
}
net_plot()
library(gridGraphics)
#> Loading required package: grid
grid.echo(net_plot())
Created on 2019-08-06 by the reprex package (v0.3.0)
First of all, what a fantastic new functionality that allows to use cowplot to combine more than just ggplots (which already was quite awesome). I tried to plot a simple
igraph
network and observed that there areNA
labels added along the network edges. Is there a way to get rid of them?Here is my code example: