Closed
Description
I came across an issue where some parts of the box plot don't get drawn when I log transform data that had a lot of zeroes in it. The image below illustrates what I mean. Having a quick look at the code I can see that cbook.boxplot_stats
is returning -inf
for some things like IQR or min values which I guess is causing weirdness.
import pandas as pd
from plotnine import *
reprex = pd.DataFrame({'value': [0,0,1,5,100000,4739273,11,0.0001,0, 0.00001,0.00001,1,5,100000,4739273,11,0.0001,0.00001],
'cat':['1','1','1','1','1','1','1','1','1','2','2','2','2','2','2','2','2','2']})
ggplot(reprex, aes('cat', 'value')) + scale_y_log10() + geom_boxplot()