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

Follow up to your reply to issue #35 (showing percent instead of counts) #36

Open
zawkzaw opened this issue Sep 21, 2022 · 0 comments
Open

Comments

@zawkzaw
Copy link

zawkzaw commented Sep 21, 2022

Hello Constantin,

Thank for your quick reply to issue #35 (showing percent instead of counts).

Under of your demonstration of "Adding Numbers on top", the following codes produce the graph with counts and bars ordered by frequency.

tidy_movies %>%
distinct(title, year, length, .keep_all=TRUE) %>%
ggplot(aes(x=Genres)) +
geom_bar() +
geom_text(stat='count', aes(label=after_stat(count)), vjust=-1) +
scale_x_upset(n_intersections = 20) +
scale_y_continuous(breaks = NULL, lim = c(0, 1350), name = "")

May I request you to show how to modify these codes to produce the graph with percents and bars ordered by percent?
In fact, I tried different ways but failed.

Thanks in advance.

Ko Ko Zaw

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