I am trying to replicate one of the examples in scikit-learn, plot_iris_dataset.py. I believe I have the latest python-matplotlib (as of Feb. 8 2013), but I am getting an error trying to call set_zticks(()) method in Axes3D object. I won't copy all the code, but it's like so:
...
ax = Axes3D(fig, elev=-150, azim=110)
...
ax.set_zticks(()
gives an error:
AttributeError: 'Axes3D' object has no attribute 'set_zticks'
Since I'm new to scikit-learn and matplotlib, I'm not really sure what the call is supposed to do. If I comment it out, I get a 3-D plot just fine (the rest of the code on the above page works). I've tried some googling but haven't found a work-around for this, but am getting hints that maybe this kind of call is outdated. I figured I'd post a question on stackoverflow hoping someone can clarify for me or others.
EDIT: I now notice that the call is supposed to remove the tick marks. It doesn't appear to work for any direction, x, y, or z, but I only get the error for the z-direction. Here's how my graph appears (the data points aren't saving in the PNG file for some reason)
Other references:
- a message thread elsewhere saying that this bug maybe is fixed in later versions.
- this page gets a google hit but I don't understand it or see reference to zticks.
matplotlib.__version__give?plt.draw()to get the effects of some modifications toaxesobjects to be reflected in the display (you changed the state of the object, but that does not automatically update state of the pretty things based on that object).