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

Set size of 2 plotting issue. #86

Open
micahgearhart opened this issue Jul 6, 2023 · 0 comments
Open

Set size of 2 plotting issue. #86

micahgearhart opened this issue Jul 6, 2023 · 0 comments

Comments

@micahgearhart
Copy link

Reposting from stackoverflow as I believe this is a bug.

A few of my sets for my plot only have two values and geom_density_ridges draws the categorical labels on the y-axis but doesn't plot any data. geom_violin, on the other hand, works fine with a set size of 2. Also, if I add jittered points to the plot they are not drawn for the n=2 sets.

Reproducible example:

df<-data.frame(class=factor(c("a","a","a","b","b")),value=c(2,4,5,2,3))
ggplot(df,aes(y=class,x=value)) + geom_violin()
ggplot(df,aes(y=class,x=value)) + geom_density_ridges()

sessionInfo:

R version 4.2.2 (2022-10-31)
ggplot2_3.4.2
ggridges_0.5.4

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