On 08/01/2010 04:55 AM, Tom Arens wrote:
> Hello everyone,
>
> does anybody know why the contour3D function has a fixed set of levels?
>
> contour3D(X, Y, Z, levels=10, **kwargs)
>
> I want to plot only one line for one level. With "contourf" it works:
>
>
>
> from mpl_toolkits.mplot3d import axes3d
> import matplotlib.pyplot as plt
>
> fig = plt.figure()
> ax = axes3d.Axes3D(fig)
> X, Y, Z = axes3d.get_test_data(0.05)
> cset = ax.contourf(X, Y, Z, 0)        # doesn't work with contour

This is a fluke. Try

cset = ax.contour(X, Y, Z, [0])

and the same for contour3d.  When the levels arg or kwarg is a scalar, 
it specifies the number of levels to be found via auto-scaling; when it 
is a sequence, it specifies the actual levels.

Eric

> ax.clabel(cset, fontsize=9, inline=1)
>
> plt.show()
>
>
>
> Many greetings,
> Tom
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to