ggmice icon indicating copy to clipboard operation
ggmice copied to clipboard

Set `ggmice()` default `fill` to mice colors

Open hanneoberman opened this issue 1 year ago • 2 comments

library(ggmice)
library(mice)
#> Warning: package 'mice' was built under R version 4.3.1
#> 
#> Attaching package: 'mice'
#> The following objects are masked from 'package:ggmice':
#> 
#>     bwplot, densityplot, stripplot, xyplot
#> The following object is masked from 'package:stats':
#> 
#>     filter
#> The following objects are masked from 'package:base':
#> 
#>     cbind, rbind
library(ggplot2)
#> Warning: package 'ggplot2' was built under R version 4.3.2
ggmice(mice(nhanes, print = FALSE), aes(bmi)) + 
    geom_histogram() 
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Created on 2023-12-07 with reprex v2.0.2

hanneoberman avatar Dec 07 '23 14:12 hanneoberman

This would not get the expected density plots, which would then require adding aes(fill = NULL) to geom_density()

hanneoberman avatar Mar 14 '24 13:03 hanneoberman

Consider importing ggplot2 functions

hanneoberman avatar Mar 14 '24 13:03 hanneoberman