JuliaPlots / StatsPlots.jl

Statistical plotting recipes for Plots.jl
Other
436 stars 88 forks source link

boxplot: Add xshift parameter #522

Closed wentasah closed 1 year ago

wentasah commented 1 year ago

This allows drawing multiple boxplots to a single graph such as in the example below:

boxplot(s18.task, s18.time, label="2018", bar_width=0.15, xshift=0.00)
boxplot!(s19.task, s19.time, label="2019", bar_width=0.15, xshift=0.15)
boxplot!(s20.task, s20.time, label="2020", bar_width=0.15, xshift=0.30)
boxplot!(s21.task, s21.time, label="2021", bar_width=0.15, xshift=0.45)
boxplot!(s22.task, s22.time, label="2022", bar_width=0.15, xshift=0.60)

image

Maybe, it's possible to do it some other way, but I've not found how.