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

arrows on point_intervals #206

Closed
ASKurz opened this issue Jan 4, 2024 · 3 comments
Closed

arrows on point_intervals #206

ASKurz opened this issue Jan 4, 2024 · 3 comments

Comments

@ASKurz
Copy link

ASKurz commented Jan 4, 2024

I see you have added the arrow argument to geom_spike(). It would be really cool if you added the arrow option for point_intervals in other functions, such as stat_halfeye() and so on, so the ends of the point_intervals could be arrows.

@mjskay
Copy link
Owner

mjskay commented Jan 4, 2024

Hmm I suppose in principle I'm not opposed. It would also be one way for people to put the little vertical markers on the intervals that some people like using grid::arrow(angle = 90,ends = "both").

mjskay added a commit that referenced this issue Jan 4, 2024
@mjskay mjskay closed this as completed in fd72890 Jan 4, 2024
@mjskay
Copy link
Owner

mjskay commented Jan 4, 2024

Should work on the github version now:

library(ggplot2)
library(ggdist)
library(distributional)

ggplot() + 
  stat_slabinterval(
    aes(xdist = dist_normal(0,1)),
    arrow = arrow(angle = 90, length = unit(4, "pt"), ends = "both")
  )

image

@ASKurz
Copy link
Author

ASKurz commented Jan 5, 2024

I love it!

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

2 participants