Skip to content

Commit

Permalink
fix for #89: now, yticks.by works with NAs
Browse files Browse the repository at this point in the history
  • Loading branch information
kassambara committed Jun 17, 2018
1 parent c4ea917 commit 84baca2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
## Bug fixes

- In `ggscatterhist()` the x variable was plotted two times, on both the plot x & y margins, instead of having, as expected, a) the x variable on the main plot x margin and 2) the y variable on the main plot y margin. This has been now fixed.
- In previous version, `ggdotchart()` sorted automatically within groups when the `color` argument is specified, even when groups = NULL. This default behaviour has been now removed. Sorting withi groups is performed only when the argument `group` is specified ([@sfeds, #45](https://github.com/kassambara/ggpubr/issues/90)).

- In previous version, `ggdotchart()` sorted automatically within groups when the `color` argument is specified, even when groups = NULL. This default behaviour has been now removed. Sorting withi groups is performed only when the argument `group` is specified ([@sfeds, #90](https://github.com/kassambara/ggpubr/issues/90)).
- Now, `yticks.by` and `xticks.by` work with NAs ([@j3ypi, #89](https://github.com/kassambara/ggpubr/issues/89)).


# ggpubr 0.1.6

## New features
Expand Down
4 changes: 2 additions & 2 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,12 @@ p

if(!is.null(yticks.by)) {
y <- .data[, .mapping["y"]]
ybreaks <- seq(0, max(y), by = yticks.by)
ybreaks <- seq(0, max(y, na.rm = TRUE), by = yticks.by)
p <- p + scale_y_continuous(breaks = ybreaks)
}
else if(!is.null(xticks.by)) {
x <- .data[, .mapping["x"]]
xbreaks <- seq(0, max(x), by = xticks.by)
xbreaks <- seq(0, max(x, na.rm = TRUE), by = xticks.by)
p <- p + scale_x_continuous(breaks = xbreaks)
}
p
Expand Down

0 comments on commit 84baca2

Please sign in to comment.