Hi list,
i am plotting some data using scatter and contour method while
using projection 3d. Now i want to label these two plots, but i
get the following warning:
"
UserWarning: No labeled objects found. Use label='...'
kwarg on individual plots. warnings.warn("No labeled
objects found. "
"
Can someone help me get the labelling working, or isn't that
possible while using 3d plots?
Thank you for your help,
Tom
The code i am using is this one:
# Start code
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
x = np.arange(1,10,1)
y = np.arange(10,20,1)
xx,yy = np.meshgrid(x,y)
z = .4*xx + 12*yy + .2*xx*yy + .32*xx**2*yy + \
.234*xx*yy**2 + .34*xx**2*yy**2
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter(xx,yy,z, label='1st label')
ax.contour(xx,yy,z, label='2nd label')
ax.legend()
ax.set_xlabel('TE')
ax.set_ylabel('TC')
ax.set_zlabel('Q')
plt.show()
# End code
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users