Skip to content

Commit

Permalink
default fill color set to lightgray for reg line confidence bands #111
Browse files Browse the repository at this point in the history
  • Loading branch information
kassambara committed May 8, 2020
1 parent 3b79b11 commit 23d9cd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## New features

- New errorbar functions - `median_hilow_()` and `median_q1q3()` - added ([@davidlorenz, #258](https://github.com/kassambara/ggpubr/issues/209)):
- New errorbar functions - `median_hilow_()` and `median_q1q3()` - added ([@davidlorenz, #209](https://github.com/kassambara/ggpubr/issues/209)):
- `median_hilow_()`: computes the sample median and a selected pair of outer quantiles having equal tail areas. This function is a reformatted version of `Hmisc::smedian.hilow()`. The confidence limits are computed as follow: `lower.limits = (1-ci)/2` percentiles; `upper.limits = (1+ci)/2` percentiles. By default (`ci = 0.95`), the 2.5th and the 97.5th percentiles are used as the lower and the upper confidence limits, respectively. If you want to use the 25th and the 75th percentiles as the confidence limits, then specify `ci = 0.5` or use the function `median_q1q3()`.
- `median_q1q3()`: computes the sample median and, the 25th and 75th percentiles. Wrapper around the function median_hilow_() using ci = 0.5.
- New function `get_breaks()` added to easily create breaks for numeric axes. Can be used to increase the number of x and y ticks by specifying the option `n`. It's also possible to control axis breaks by specifying a step between ticks. For example, if by = 5, a tick mark is shown on every 5 ([@Chitanda-Satou, #258](https://github.com/kassambara/ggpubr/issues/258)).
Expand All @@ -14,7 +14,7 @@

## Bug fixes

- `ggscatter()`: When `conf.int = FALSE`, fill color is set to "lightgray" for the regression line confidence band ([@zhan6073, #111](https://github.com/kassambara/ggpubr/issues/111)).
- Now, `gghistogram()` supports the paramter `yticks.by` ([@Chitanda-Satou, #258](https://github.com/kassambara/ggpubr/issues/258)).


Expand Down
1 change: 1 addition & 0 deletions R/ggscatter.R
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ ggscatter_core <- function(data, x, y,
if(add %in% c("reg.line", "loess")){
add <- ifelse(add == "reg.line", stats::lm, stats::loess)
if(is.null(add.params$linetype)) add.params$linetype <- "solid"
if(conf.int == FALSE) add.params$fill <- "lightgray"

.args <- .geom_exec(NULL, data = data,
se = conf.int, level = conf.int.level,
Expand Down

0 comments on commit 23d9cd5

Please sign in to comment.