Home > other >  How to set the font type of zticks in matplotlib 3D plots
How to set the font type of zticks in matplotlib 3D plots

Time:09-20

I'm having trouble setting the tick font type for the z-axis, I can use the following code to set the font of the x-axis and y-axis to "Times New Roman", but the z-axis uses the same method to report an error.

plt.xticks(fontproperties = 'Times New Roman') 
plt.yticks(fontproperties = 'Times New Roman')
# plt.zticks(fontproperties = 'Times New Roman') #AttributeError: module 'matplotlib.pyplot' has no attribute 'zticks'

Does anyone know how to fix this? Thank you for your help.

CodePudding user response:

Try with this solution. I was inspired by enter image description here

  • Related