I have a data-set that includes 0s and ranges up to 1
set.seed(190)
b<-runif(10000,min=1e-15,1)
#Create 0s
b[sample(NROW(b),200)]<-0
I'm trying to recreate something like this that was made in python's Seaborn but using ggplot on a log10 scale. It appears that ggplot cannot first calculate the percentiles including the 0s and instead excludes them before transforming the axis. How can I replicate these plots?
tibble(value=b, name=rep(1,1e4)) %>%
ggplot(aes(x=name,y=b))+
geom_boxplot(outlier.alpha=0.1)+
scale_y_continuous(trans=scales::pseudo_log_trans(base = 10),limits=c(10^-12, 10^0), breaks=10^seq(-12,0,2))+
stat_summary(fun=mean, geom="point", shape=4, size=3, color="black")
But this produces the following box plot and warns of removed non-finite rows. How do you avoid ggplot removing the log10(0)?
NB: I took the following stack question as inspiration.



