Closed vertesy closed 6 years ago
This is not easy to achieve with corrr, nor is it something I would implement now (want to move away from adding customisable features to quick plots and more towards better integration with general plotting tools).
For now, I'd recommend taking a different approach such as building the plot from scratch with ggraph. Here's a post I've written to get you started: https://drsimonj.svbtle.com/how-to-create-correlation-network-plots-with-corrr-and-ggraph
Sorry for hammering on this issue, but is it possible then to extract the coordinates of the points for custom plotting?
I looked at the object produced by obj = network_plot(mydat)
but it seems quite complex. I guess I should find somewhere dataframe with X and Y coordinates for each node.
Could you help me if it is stored in obj
, and how can I extract it? Thanks!
Ok, this was one of longest way I ever took to get the XY coordinates from a 2D plot ...
XX = corrr::correlate(DAT)
plot.obj=network_plot(XX)
plot.obj.bld = ggplot_build(plot.obj)
XY.coord = plot.obj.bld$data[[3]][,1:2]
plot(XY.coord)
Finally this issue can be really closed.
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
I have a data set, where the data comes in different categories. These categories I would like to indicate as the color of the nodes. The categories I store in a numeric vector
AnnotVector
.I tried: