Hello!
How to add strings to the axes in Axes3D instead of numbers?
I just started using the matplotlib. I have used Axes3dD to plot similar to the example given on their website (http://matplotlib.sourceforge.net/examples/mplot3d/bars3d%5Fdemo.html). Note that one must use the last verson (matplotlib 0.99.1), otherwise the axis gets a bit freaky. The example use this code:
from mpl_toolkits.mplot3d import Axes3D  
import matplotlib.pyplot as plt  
import numpy as np  
fig = plt.figure()  
ax = Axes3D(fig)  
for c, z in zip(['r', 'g', 'b', 'y'], [30, 20, 10, 0]):
    xs = np.arange(20)
    ys = np.random.rand(20)
    ax.bar(xs, ys, zs=z, zdir='y', color=c, alpha=0.8)
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_zlabel('Z')
plt.show()
Now to my problem, I cant rename the axis to what I want. Instead of numbers i need to name the staples to string names. This I only want to do in two dimensions - the x dimension, and the z dimension (depth). I have tried to use this command:
ax.set_xticklabels('First staple',(0,0))
I get no errormessage but nevertheless no sting. If anyone can answer this question I would be most delighted!
Cheers Andreas