Black Lives Matter. Please consider donating to Black Girls Code today.

How to rotate "title" text in the axis

I have a dash application showing temperature. The “y axis” show degrees. I want the numbers to be shown normal, but the title for the axis is just “ºC” and I would love to see it horizontally instead of reading it vertically.

For longer titles this is a non issue because horizontal orientation would overlap the graph, very ugly, but for “ºC” horizontal is just fine and far prettier and easy to the eye.


It’s not possible to change the rotation of the axis title. However, for units, you should try out layout.yaxis.ticksuffix combined with layout.yaxis.showtickprefix = 'first'

Cool trick, @chriddyp. In my case, I use “showticksuffix=‘last’”.


1 Like