views:

41

answers:

1

Hi

How do I display (turn on) minor ticks on a 3D surface plot using mplot3d / axes3d graph?

I can define the major tickmark locations using:

ax.w_zaxis.set_major_locator(MultipleLocator(10))

Similarly, I'm guessing I can define the the minor ticks using:

ax.w_zaxis.set_minor_locator(MultipleLocator(2))

This appears to define the minor tick locators but doesn't actually turn them on in my plot. How do I turn the minorticks on in my axes3D?

Thanks for your help

Mark

+1  A: 

From what I can tell, minor tick marks aren't fully implemented in mplot3d. The place I'm looking at in the matplotlib code is Your_Python_Lib_site-packages\mpl_toolkits\mplot3d\axis3d.py in the draw() function. I see only the code to draw the major tick marks, not the minor ones. It seems like it wouldn't be all that hard to modify the code to make it draw the minor tick marks too. I wonder if the matplotlib people even know that the minor tick marks don't work in mplot3d.

Justin Peel
Thanks for your response. That would make sense as to why they don't seem to work on my plots. It's a real shame as minor ticks would be really useful! Perhaps they'll implement it in a future release?
Mark