cjvanlissa / tidySEM

54 stars 7 forks source link

map aesthetics to edges? #7

Closed mattansb closed 3 years ago

mattansb commented 4 years ago

This is a spectacular package! The plots look soooooooo nice right out of the box!

Some enhancements / suggestions (:

Is it possible to map edge data to the aesthetics of the edges (from get_edges())? Something like aes(color = est) that can then be controlled with scale_color_*() or or aes(linetype = p < 0.05) that can then be controlled with scale_linetype _*() or something like that?

Thanks!

mattansb commented 4 years ago

(BTW, I am absolutely in love with the edges()<- and nodes()<- functions! This is fantastic!!)

cjvanlissa commented 3 years ago

@mattansb this is already possible, see the vignette https://cjvanlissa.github.io/tidySEM/articles/Plotting_graphs.html#visual-aspects

You can just add the desired aesthetic as a column to the edges data.frame. E.g.:

edges(p)$colour <- c("red", "blue", "red")