|
From: Diego A. <die...@gm...> - 2012-12-17 01:22:21
|
dear all, I have plot a 3D picture, I would like to have xy projection with contours levels and labels. The contours works but I do not get the labels. This is my code: import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d, Axes3D fig = plt.figure() ax = Axes3D(fig) #<-- Note the difference from your original code... X, Y, Z = axes3d.get_test_data(0.05) cset = ax.contour(X, Y, Z,100,zdir='z',offset=-100) ax.clabel(cset, fontsize=9, inline=1) plt.show()import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d, Axes3D #<-- Note the capitalization! fig = plt.figure() ax = Axes3D(fig) #<-- Note the difference from your original code... X, Y, Z = axes3d.get_test_data(0.05) cset = ax.contour(X, Y, Z,100,zdir='z',offset=-100) ax.clabel(cset, fontsize=9, inline=1) plt.show() Is it possible to have also the labels? Thanks Diego |