How to adjust the X-axis order of boxplot with StatsPlots.jl

Hi, @mkborregaard, I have no knowledge of internal details. But how about

@df df boxplot(string.(:id), :value, fillalpha=0.75, linewidth=1, xorder=[3, 17, 21])

Or we may pass into a custom sort function to sort the specific column in a df.

@df df boxplot(string.(:id), :value, fillalpha=0.75, linewidth=1, 
                         xsort=sort)

The above two lpad and sprintf workarounds work well for this particular example. But what if I want the order to be 21 3 17? Of course, I can still find a workaround, but it does not look beautiful.

1 Like