[Makie] Rotate bar plot labels

I have a bar-plot:

But the labels are hard to read in this orientation. A workaround is to make the plot with direction = :x:

But is there a way to simply rotate the labels in the first plot?

Code used to create first plot:

fig, ax, plt = barplot([mean(fc.*(√2, 1/√2)) for fc in centerfrex_octave3rd], octave3rd_rms,
    width=[0.95*fc*(2^(1/6)-1/2^(1/6)) for fc in centerfrex_octave3rd],
    bar_labels = ["fc = $fc" for fc in centerfrex_octave3rd], label_size=15,
    direction=:x,
    flip_labels_at=60,
    axis = (ylabel="Frequency", xlabel="RMS value, dB", title = "Barplot octave3rd-bands, filterorder = $order")
); ax.yscale=log10; ax.xminorticks = IntervalsBetween(4, true); ax.xminorgridvisible=true; ax.xminorgridwidth = 2; ax.xminorticksvisible=true; fig

Code for second plot:

fig, ax, plt = barplot([mean(fc.*(√2, 1/√2)) for fc in centerfrex_octave3rd], octave3rd_rms,
    width=[0.95*fc*(2^(1/6)-1/2^(1/6)) for fc in centerfrex_octave3rd],
    bar_labels = ["fc = $fc" for fc in centerfrex_octave3rd], label_size=15,
    #direction=:x,
    flip_labels_at=40,
    axis = (ylabel="Frequency", xlabel="RMS value, dB", title = "Barplot octave3rd-bands, filterorder = $order")
); ax.xscale=log10; ax.xminorticks = IntervalsBetween(4, true); ax.xminorgridvisible=true; ax.xminorgridwidth = 2; ax.xminorticksvisible=true; fig

You can always go inside the components of a composite plot like this and change attributes there. So you could go into barplot.plots, find the text plot and change the rotation. This case was simply not considered when writing the recipe I assume

1 Like

Did you find a way to do this?

Nope. If I needed it again, I would follow Jule’s suggestion to add the option in the recipe myself - I dont think it would be that hard to add the kwarg to the recipe.