has2k1 / plotnine

A Grammar of Graphics for Python
https://plotnine.org
MIT License
3.89k stars 209 forks source link

Should geom_boxplot() with disabled outliers rescale the axis? #814

Open floringogianu opened 1 week ago

floringogianu commented 1 week ago

Disabling the outliers in a geom_boxplots() hides the markers but keeps the original scale (as if the outliers were present). Should the axis be rescaled (eg. how seaborn behaves)?

If not, is there a clean way to achieve this?

later edit: I know it can be done manualy, just wondering if there's an automated way of recomputing the limits:

(
    p9.ggplot(df)
    + p9.geom_boxplot(p9.aes(x="factor(map)", y="fft_max", color="objective"), outlier_shape='')
    + p9.coord_flip()
    + p9.ylim(0.3, 0.5)
)

image image