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

Feature Request: Fill ggridges with Images #61

Open
hunterkempf opened this issue Sep 23, 2020 · 2 comments
Open

Feature Request: Fill ggridges with Images #61

hunterkempf opened this issue Sep 23, 2020 · 2 comments

Comments

@hunterkempf
Copy link

My Feature Request is to make the fill "color" of the ridges into an image. The idea is similar to this repo (flags on country shapes) or this repo (images split by line charts or bar charts). I am not sure how hard it would be to incorporate but I think it has the potential to make some cool graphics especially with country level data.

@trevorld
Copy link
Contributor

  • FYI: I think this should be possible now after feat: Support grid::pattern() / gradient fills #98
  • You need R 4.2+ and ggplot2::check_device("patterns") must be TRUE in your active graphics device i.e. the newish pattern fill functionality must be supported by your graphics device.
  • You could manually wrap the image in grid::rasterGrob() and then in a grid::pattern() object or perhaps alternately use gridpattern::patternFill("image").

@clauswilke
Copy link
Collaborator

Yes. Here is a long tutorial on pattern fills: https://wilkelab.org/dataviz_shortcourse/materials/positconf2024-pattern-fill.html

This should work now with the development version of ggridges, though I haven't tried.

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

No branches or pull requests

3 participants