NOAA-EDAB/Rpath

Better labels for webplot()

Closed this issue · 2 comments

okenk commented

Hi-- thanks so much for this package, I love being able to do all of the modeling in R!

A coauthor did not like the food web plot that I produced using Rpath::webplot() because all of the overlapping text was hard to read. I solved this by slightly amending the function so that instead of directly plotting everything, it just saves the set of points (this was already there) and set of line segments (this is what I added), and then plotted it in ggplot so I could take advantage of the ggrapel package.

Here is the original figure:
foodweb

And the updated one:
ggrepel_plot

(Slightly different geometries because they have different random number seeds.)

It seems like this could be useful for future users. I was wondering if you'd be interested in incorporating it into the package or what the process is for contributing?

Thanks,
Kiva

This is great! I love seeing an easier solution to my rudimentary code. Please feel free to make a pull request that we can review and incorporate.

slucey commented

Pull request #44