-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
custom legend icons for geom_phylopic #57
Comments
I've been bashing my head against a wall trying to get this to work, but I'm not making any progress on this. I was originally trying to treat img as an aesthetic, so the legend could then have different silhouettes in it. However, it appears that that isn't possible with the way ggplot handles the rendering of legends. However, I think I can make it such that the user can specify a silhouette to be used for the entire legend. This obviously wouldn't be that useful for plots with multiple different silhouettes, but could be very useful and aesthetically pleasing for plots with just a single unique silhouette. |
It might even be possible that, if only one unique silhouette is used in a plot, we just use that one automatically. |
Hmm... this should be relatively straightforward to implement. Ultimately, what we want to achieve is just changing the glyph in a legend. I think the best way to do this is implementing a |
Yes, it's straightforward to have a single custom image, but not straightforward to have the images be based on the images in the plot itself. |
After many attempts to make this automated, I've resorted to implementing a manual method for users to specify the silhouettes in the legend in the |
Some more information: the new method uses a package environment to store data between legend key generations. Unfortunately, this doesn't work for transferring information from the geom renderer to the legend renderer because the legend gets rendered first (ugh). |
@LewisAJones requests that legends related to
geom_phylopic
should use the silhouettes instead of pointsThe text was updated successfully, but these errors were encountered: