2

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?

Sleepyhead
  • 1,009
  • 1
  • 10
  • 27
  • I didn't test it in 3D Plots, but maybe you can use plt.text() instead of labels http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.text – BigZ Oct 06 '15 at 15:02

1 Answers1

1

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
Community
  • 1
  • 1
tmdavison
  • 64,360
  • 12
  • 187
  • 165
  • @Sleepyhead: it looks like in `matplotlib v1.5.0` mplot3d now resepcts the `{x,y}axis.labelpad rcParams` http://matplotlib.org/users/whats_new.html#configuration-rcparams – tmdavison Nov 03 '15 at 16:44