Skip to content
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

Plots as a guide #43

Open
teunbrand opened this issue Jan 7, 2025 · 3 comments
Open

Plots as a guide #43

teunbrand opened this issue Jan 7, 2025 · 3 comments
Labels
💡 feature New feature or request

Comments

@teunbrand
Copy link
Owner

Taking this one step further, do you think legendry could accommodate completely arbitrary plots as shown here? My naive understanding is that this could be a new type of guide which accepts a function that produces a plot and receives the limits. For axis guides, one would need to ensure that the output is correctly aligned, and for legend guides one would need to think through how to do the layouting.

Originally posted by @const-ae in #38 (comment)

@teunbrand teunbrand added the 💡 feature New feature or request label Jan 7, 2025
@teunbrand
Copy link
Owner Author

This feature would require tidyverse/ggplot2#3441 to be completed in order to copy the scale from one plot to the next.

@aphalo
Copy link

aphalo commented Jan 9, 2025

I think this feature would be useful also when plotting light spectra for adding a graphical guide showing the colours matching the different wavelengths. In 'ggspectra' I am faking this with a geom call, but it depends on the manual fill scale which is undesirable in many cases. Even if a better approach with geoms would be possible, semantically it functions as a guide.

@teunbrand
Copy link
Owner Author

Yeah if your axis is wavelength, it'd make sense to align a visual spectrum along that axis. I probably won't implement something as specific as a wavelength axis, but I'd like to make it easier to build your own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants