Closed anbai106 closed 1 year ago
not directly, but there are a number of possible ways to save the output of a htmlwidget
as an SVG, e.g...
https://stackoverflow.com/a/57751023/4389763
https://stackoverflow.com/a/64673967/4389763
https://github.com/cjyetman/network.r2d3/blob/main/R/save_as_svg.R
Thanks so much for your quick reply!
I have another question. For the Sankey plot, how can I make the nodes with the same color (defined by NodeGroup parameter) in the same column?
Say: shallow blue is a group of genes, dark orange is a group of drugs and shallow orange is a group of diseases.
I can only drag these nodes vertically but not horizontally after I generate the image.
Great tool!
Thanks
That is also something that {networkD3} was not designed to do. The primary functionality of {networkD3} is automatically determining and plotting an "ideal" layout of networks, for quick and easy interactive exploration. If you want a lot of control over where/how nodes are positioned etc. (e.g. for publication and/or static images), {networkD3} is probably not the best tool for that.
Hi,
I don't know if this is the right question, but can we save the output image as SVG format? Rstudio or R default svg function does not work.
Thanks