How to change the alignment of z-axis label with Matplotlib

177 Views Asked by At

I have a 3D plot and would like to push the z-axis label, drawn vertically, downwards because it overlaps the scale factor placed by ScalarFormatter. The latter doesn't have obvious options to set the position of the scale factor or provide a reference for the scale factor text. So now I am looking to push the z-axis label downward.

z-axis labels don't support the loc option, although the doco implies it does (it says "see set_yabel"). The z-axis label position does not respond to horizontalalignment or verticalalignment options. Extra spaces at the end of the label don't help either, even math mode spaces.

I can get a reference to the label, it current position is (0.5, 0) which is before transformation I guess, but setting its position makes no difference. It does have a transform set according to is_transform_set(), but I really don't want to go down the path of changing its transform.

Any idea of an easier way to do this?

0

There are 0 best solutions below