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

geom_dumbbell end point shape by group #81

Open
kimblew opened this issue Jan 31, 2023 · 0 comments
Open

geom_dumbbell end point shape by group #81

kimblew opened this issue Jan 31, 2023 · 0 comments

Comments

@kimblew
Copy link

kimblew commented Jan 31, 2023

Hi @hrbrmstr liking geom_dumbbell but have a case where I would like to have different shapes for the end point based upon a group

looking something similar to

df <- data.frame(sample = c('a','b'), from=c(1,2), to=c(4,3),outcome=as.factor(c('happy','sad')))
ggplot(df, aes(y=forcats::fct_reorder(sample,from,.desc=T),x=from,xend=to)) + geom_dumbbell() + labs(y=NULL)

geom_dumbbell(shape_xend = outcome)

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