Sleepyhead
Sleepyhead

Reputation: 1021

matplotlib set_label_position no effect in 3d?

I am trying to move the position of the label of the axis in 3d view in matplotlib. I have tried ax.xaxis.set_label_position and ax.xaxis.set_label_coords. Both seem to have no effect. enter image description here

I'd like to move t/T_L away from the label ticks. How is it done?

Upvotes: 2

Views: 1074

Answers (1)

tmdavison
tmdavison

Reputation: 69116

Label padding in 3D plots does not work the same way as for 2D plots.

As shown in this answer, you can set the labelpad using ax.xaxis._axinfo['label']['space_factor']. Its not particularly pretty, but it works.

ax.xaxis._axinfo['label']['space_factor'] = 2.8

Upvotes: 1

Related Questions