On Sun, Dec 16, 2012 at 8:22 PM, Diego Avesani <diego.aves...@gmail.com>wrote:
> 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
>
>
Theoretically, yes. I have just never thought about that sort of feature
before, and it would not be trivial to implement. In the meantime, you can
take a look at this example for a way to manually label things in a 3d plot.
http://matplotlib.org/examples/mplot3d/text3d_demo.html
Ben Root
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users