Closed kylebaron closed 1 year ago
This PR fixes a bug in pmplots 0.3.6 where the density line wasn't getting drawn for npde_hist() and probably cwres_hist() too.
npde_hist()
cwres_hist()
@callistosp Reported this in #74
The bug is fixed by using density rather than ..density.
density
..density
A test was added to check the number of layers in the resulting ggplot ... 2 by default and controllable via add_density argument.
add_density
I also updated some documentation in the relevant functions; this was a little out of scope but did it anyway.
library(pmplots) #> Loading required package: ggplot2 data <- pmplots_data_obs() npde_hist(data) + facet_wrap(~CPc) #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
packageVersion("pmplots") #> [1] '0.3.6.9000'
Created on 2023-02-02 with reprex v2.0.2
Summary
This PR fixes a bug in pmplots 0.3.6 where the density line wasn't getting drawn for
npde_hist()
and probablycwres_hist()
too.@callistosp Reported this in #74
The bug is fixed by using
density
rather than..density
.A test was added to check the number of layers in the resulting ggplot ... 2 by default and controllable via
add_density
argument.I also updated some documentation in the relevant functions; this was a little out of scope but did it anyway.
Created on 2023-02-02 with reprex v2.0.2