const-ae / const-ae/ggupset

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

Open
#36 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
399
Forks
32
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing issue #35 and the example using tidy_movies, ggplot, geom_bar, geom_text, scale_x_upset, and scale_y_continuous. Reproduce the shown plot, then document the changes needed for percentage labels and percentage-ordered bars; done means the example clearly demonstrates that output.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.