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

variant of vline / hline with ribbon #140

Open
mjskay opened this issue Jul 10, 2022 · 5 comments
Open

variant of vline / hline with ribbon #140

mjskay opened this issue Jul 10, 2022 · 5 comments

Comments

@mjskay
Copy link
Owner

mjskay commented Jul 10, 2022

Might be nice to have a version of lineribbon / pointinterval that acts like geom_vline / geom_hline plus a ribbon. See e.g. https://twitter.com/SolomonKurz/status/1546241985597546497?s=20&t=ezZYkV4REc7LfdfFvYAPOg

@mjskay
Copy link
Owner Author

mjskay commented Jul 10, 2022

Name is one question... seems odd to have a geom_hlineribbon and geom_vlineribbon in this modern orientation-aware ggplot landscape. Maybe geom_hvlineribbon? Feels awkward.

@mjskay
Copy link
Owner Author

mjskay commented Jul 10, 2022

looking at some related words and synonyms there's stuff like: axis-aligned, parallel, flat, flush, rule, ...

no great names, and vlineribbon / hlineribbon are probably the most discoverable. So maybe use those names as aliases for each other / hvlineribbon and let orientation detection do its work.

@mjskay
Copy link
Owner Author

mjskay commented Jul 10, 2022

also a vribbon and hribbon variant probably

@mjskay
Copy link
Owner Author

mjskay commented Jul 17, 2022

Also consider: should this have a gradient variant that allows mapping pdf/cdf? Would actually work easily here unlike with lineribbon.

@mjskay
Copy link
Owner Author

mjskay commented Mar 24, 2023

more thoughts: the gradient pdf/cdf thing isn't really worth it atm.

This should be doable by making sure geom_lineribbon works with infinite bounds. So I'd say the simple version of this is something like:

  • add a stat_vlineribbon() and stat_hlineribbon() that just generate the necessary c(-Inf, Inf) x/y values to get a vertical ribbon
  • maybe add a stat_ablineribbon() which takes a 2d dist in the dist aesthetic giving the joint dist over slope and intercept and generates a line from it. Might move that to another issue.

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

1 participant