Closed callistosp closed 1 year ago
Yep, I would bet this has something to do with the recent (minorly infamous) ggplot2
change related to linewidth
.
It looks like npde_hist()
ultimately filters through to cont_hist()
, which calls add_density()
to get that line, which... was changed to accomodate that ggplot2
release.
I'm not sure if this is something we should change in pmplots
or if it's part of another package, as @callistosp suspects, but we should definitely look into it and try to get a patch release out before the next MPN.
@callistosp -
Thanks for the report. Can you try passing add_density
through to force this to get drawn?
library(pmplots)
#> Loading required package: ggplot2
data <- pmplots_data_obs()
npde_hist(data, add_density = TRUE) + facet_wrap(~CPc)
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Created on 2023-02-02 with reprex v2.0.2
I think the name of those stats also changed and we were just checking for the wrong value there.
Kyle
yes, I can confirm that adding add_density = TRUE
brings the smooth line back on the histograms. Thanks for the quick diagnosis!
We recently updated some old code to use pmplots v0.3.6 instead of v0.3.3. When this was done the smooth line in
npde_hist
no longer appears. I reran the code using v0.3.5 and the line was there, so it appears to be due to either some change between these two versions or, more likely, an issue with another package on the 2023-01-25 MPN snapshot.