Skip to content

Commit

Permalink
Reverse Y axis in ggally_count() (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke committed Jun 21, 2021
1 parent 68f15c4 commit 3918c50
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
@@ -1,5 +1,5 @@
Package: GGally
Version: 2.1.2
Version: 2.1.2.9000
License: GPL (>= 2.0)
Title: Extension to 'ggplot2'
Type: Package
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
@@ -1,3 +1,10 @@
# GGally (development version)

### Bug fixes

* Reverse ordering of y-axis in `ggally_count()` (#420)


# GGally 2.1.2

### Bug fixes
Expand Down
5 changes: 3 additions & 2 deletions R/gg-plots.R
Expand Up @@ -1491,8 +1491,9 @@ ggally_count <- function(data, mapping, ...) {
ggplot(data, mapping) +
do.call(stat_ggally_count, args) +
scale_y_continuous(
breaks = 1:length(levels(data[[count_col]])),
labels = levels(data[[count_col]])
breaks = seq_along(levels(data[[count_col]])),
labels = levels(data[[count_col]]),
trans = scales::reverse_trans()
) +
theme(panel.grid.minor = element_blank()) +
ylab(ylabel)
Expand Down

0 comments on commit 3918c50

Please sign in to comment.