Re: [Matplotlib-users] Drawing a single contour line

2009-11-16 Thread Eric Firing
Brendan Arnold wrote: > Hmm, after a little more work it seems that the problem is actually > with the 'clabel' command. To expand on Eric's example, > > x = arange(5) > y = arange(7) > X, Y = meshgrid(x,y) > z = X+Y > c=contour(X, Y, z, [5]) > clabel(c, inline=1) > > (causes exceptions in a fres

Re: [Matplotlib-users] Drawing a single contour line

2009-11-16 Thread Eric Firing
Brendan Arnold wrote: > Hmm, after a little more work it seems that the problem is actually > with the 'clabel' command. To expand on Eric's example, > > x = arange(5) > y = arange(7) > X, Y = meshgrid(x,y) > z = X+Y > c=contour(X, Y, z, [5]) > clabel(c, inline=1) > > (causes exceptions in a fres

Re: [Matplotlib-users] Drawing a single contour line

2009-11-16 Thread Brendan Arnold
Hmm, after a little more work it seems that the problem is actually with the 'clabel' command. To expand on Eric's example, x = arange(5) y = arange(7) X, Y = meshgrid(x,y) z = X+Y c=contour(X, Y, z, [5]) clabel(c, inline=1) (causes exceptions in a fresh ipython session) clabel causes problems i

Re: [Matplotlib-users] Drawing a single contour line

2009-11-04 Thread Eric Firing
John Hunter wrote: > On Wed, Nov 4, 2009 at 11:16 AM, Brendan Arnold > wrote: >> Ah, I was a little confused by what you wrote John (I though I had to >> access contour through the axes object and the meaning of R, F, dR was >> a little unclear..) however using the 'levels' keyword now works. i.e

Re: [Matplotlib-users] Drawing a single contour line

2009-11-04 Thread John Hunter
On Wed, Nov 4, 2009 at 11:16 AM, Brendan Arnold wrote: > Ah, I was a little confused by what you wrote John (I though I had to > access contour through the axes object and the meaning of R, F, dR was > a little unclear..) however using the 'levels' keyword now works. i.e. > > plt.contour(x, y, z,

Re: [Matplotlib-users] Drawing a single contour line

2009-11-04 Thread Brendan Arnold
Ah, I was a little confused by what you wrote John (I though I had to access contour through the axes object and the meaning of R, F, dR was a little unclear..) however using the 'levels' keyword now works. i.e. plt.contour(x, y, z, levels=[0]) Incidentally, this keyword (levels) is not documente

Re: [Matplotlib-users] Drawing a single contour line

2009-11-02 Thread Pierre de Buyl
From memory, you just need to make a length one list contour(z, [i]) Pierre Le 2 nov. 09 à 22:19, Brendan Arnold a écrit : > Hi there, > > I can draw a single contour line in MATLAB using > > contour(z, [i i]) > > however, > > contour(z, [i, i]) > > using matplotlib gives an error. In fact any

Re: [Matplotlib-users] Drawing a single contour line

2009-11-02 Thread John Hunter
On Mon, Nov 2, 2009 at 3:19 PM, Brendan Arnold wrote: > Hi there, > > I can draw a single contour line in MATLAB using > > contour(z, [i i]) > > however, > > contour(z, [i, i]) > > using matplotlib gives an error. In fact any plot that plots a single > line (i.e. contour(z, 1)) also gives an error

[Matplotlib-users] Drawing a single contour line

2009-11-02 Thread Brendan Arnold
Hi there, I can draw a single contour line in MATLAB using contour(z, [i i]) however, contour(z, [i, i]) using matplotlib gives an error. In fact any plot that plots a single line (i.e. contour(z, 1)) also gives an error as follows, TypeError: unhashable type: 'numpy.ndarray' How do I draw a