JuliaPlots / StatsPlots.jl

Statistical plotting recipes for Plots.jl
Other
442 stars 90 forks source link

Boxplots width in log scale #347

Open Djoop opened 4 years ago

Djoop commented 4 years ago

When I draw boxplots with the x axis in logscale (for instance, overprinted over some other plot with xscale=:log10), the box widths are constant over the x axis, so that the boxes appear smaller and smaller in width when x gets larger. Is this unsupported, or am I doing it wrong?

Lirimy commented 1 year ago

You can specify the width of individual bars by giving a series to bar_width.

using StatsPlots

boxplot([10 100 1000], [randn(10).+10 randn(10).+20 randn(10).+30];
    xscale=:log10, bar_width=[2 20 200])