You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the man page ?geom_edge_link, under Arguments, it says
label_colour The colour of the edge label. If NA it will use the colour of the edge.
I've been trying to make use of this to make the edge label inherit the colour of its edge, but I can't make it work. Leaving out the label_colour argument gives me black labels, while explicitly setting label_colour = NA removes the edge labels altogether.
MWE to illustrate (ggraph 2.0.2):
library(tidygraph)
#> #> Attaching package: 'tidygraph'#> The following object is masked from 'package:stats':#> #> filter
library(ggraph)
#> Loading required package: ggplot2g<- create_ring(10) %>%
activate("edges") %>%
mutate(
label=letters[1:10],
colour= rep(c(TRUE, FALSE), 5)
)
ggraph(g) +
geom_edge_link(
aes(label=label, colour=colour)
) +
geom_node_point()
#> Using `stress` as default layout
ggraph(g) +
geom_edge_link(
aes(label=label, colour=colour),
label_colour=NA# Makes the labels disappear
) +
geom_node_point()
#> Using `stress` as default layout
Am I misunderstanding the docs here? I would've thought that either of these would've made the edge labels take the colours of their associated edge. As far as I can tell, the same thing happens label_alpha.
Thank you for a great package.
The text was updated successfully, but these errors were encountered:
In the man page
?geom_edge_link
, underArguments
, it saysI've been trying to make use of this to make the edge label inherit the colour of its edge, but I can't make it work. Leaving out the
label_colour
argument gives me black labels, while explicitly settinglabel_colour = NA
removes the edge labels altogether.MWE to illustrate (
ggraph
2.0.2):Created on 2020-03-21 by the reprex package (v0.2.1)
Am I misunderstanding the docs here? I would've thought that either of these would've made the edge labels take the colours of their associated edge. As far as I can tell, the same thing happens
label_alpha
.Thank you for a great package.
The text was updated successfully, but these errors were encountered: