Re: [Matplotlib-users] Selectable contour(f) divisions

2010-02-12 Thread Matthias Michler
On Friday 12 February 2010 15:11:17 Bruce Ford wrote: > Thanks for this. I didn't realize that N could be an array and > contour would know that these are the levels desired. > > I found similar in an example, but not in the contour documentation. Just a remark: I use the h

Re: [Matplotlib-users] Selectable contour(f) divisions

2010-02-12 Thread Matthias Michler
Hi Bruce, why don't you use contour as in the following ;-) contour(X,Y,Z,V) # -> draw contour lines at the values specified in sequence *V* like in x, y = np.meshgrid(np.linspace(0, 1, 100), np.linspace(0, 1, 50)) z = x**4 - x**2 + np.sin(y) contour(x, y, z, [-0.2, 0.0, 0.2, 0.4,

Re: [Matplotlib-users] selecting part of a contour to plot

2010-06-22 Thread Benjamin Root
Jon, One thing you can do is to manually specify the levels to contour for in the contour call, or just specify the number of contours (and contour() will figure out the levels for you). The fourth argument to contour() allows you to give a sequence of values (or an integer) for the isopleths

Re: [Matplotlib-users] Selectable contour(f) divisions

2010-02-12 Thread Bruce Ford
Thanks for this. I didn't realize that N could be an array and contour would know that these are the levels desired. I found similar in an example, but not in the contour documentation. Thanks so much! Bruce --- Bruce W. Ford Clear Science, In

Re: [Matplotlib-users] selecting part of a contour to plot

2010-06-22 Thread Benjamin Root
Actually, I just re-read your original message and noticed that you were specifying your levels (I believe). The double set of contours depends on what your values are. If you want to make absolutely sure that there aren't extra lines, you could contour a boolean array: contour(x, y, z

[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

Re: [Matplotlib-users] Different contours in contour and contourf

2006-12-08 Thread Eric Firing
Yannick Copin wrote: > Hi, > > running the simple test code: > > from pylab import * > X, Y = meshgrid(linspace(-3,3,11),linspace(-3,3,11)) > Z = randn(*X.shape) > lev = linspace(Z.min(),Z.max(),11)[1:-1] > contourf(X,Y,Z, lev, extend='both') > contour(X

[Matplotlib-users] [Fwd: Re: contour & colorbar...]

2007-06-12 Thread Eric Firing
--- Begin Message --- fred wrote: Hi, Please look at the short example attached showing the issue. I want to display only one contour line, with value 0.8. Obviously, the color associated with this contour line is bad (blue instead of red color). I think the reason is that the contour has

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 > lin

[Matplotlib-users] Coordinates of contour lines

2009-04-09 Thread Ewald Zietsman
Hi All, I need to use the coordinates of a contour line for further calculations. Is there a simple way to get the x,y coordinates from a contour object or otherwise? i.e. I have (x,y,z) coordinates and have created a contour map from these. I need the (x,y) coordinates of the contour line with

Re: [Matplotlib-users] selecting part of a contour to plot

2010-06-22 Thread Jae-Joon Lee
contour creates list of LineCollection objects (per each level I suppose) which is stored in "collections" attribute. For example, cntr = contour(A, levels) then cntr.collections[i] is a LineCollection objects that is associated with levels[i]. And you can change colors of each l

Re: [Matplotlib-users] Plotting 2D Structured CFD Grids and contour plots

2013-03-31 Thread Ian Thomas
On 29 March 2013 20:15, Jeff Layton wrote: > Good afternoon, > > I'd like to be able to plot some 2D Structured CFD meshes > and contour plots (pressure, etc) using Matplotlib. I've > googled a little but does anyone have any pointers or > links to help get me s

[Matplotlib-users] contour & colorbar...

2007-06-11 Thread fred
Hi, Please look at the short example attached showing the issue. I want to display only one contour line, with value 0.8. Obviously, the color associated with this contour line is bad (blue instead of red color). I think the reason is that the contour has its own colormap, so for only one

Re: [Matplotlib-users] selecting part of a contour to plot

2010-06-23 Thread Jonathan Slavin
Thanks to Benjamin Root and Jae-Joon Lee for their responses. The solution that I had come up with in the mean time is similar to Jae-Joon's suggestion. I did: c = contour(z,level,colors='k') xy = c.collections[0].get_paths()[0].vertices # produces (N,2) array of points plot(xy[

Re: [Matplotlib-users] labeling contours with roman numerals

2007-12-14 Thread Mark Bakker
I would guess: CS=contour(A,[50,]) CS.clabel(fmt=FormatFaker('I')) # Labels contour 50 with I CS=contour(A,[60,]) CS.clabel(fmt=FormatFaker('II')) # Labels contour 60 with II Or write a loop if you have many values. Mark On Dec 14, 2007 11:44 PM, Michael Hearne <[

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 m

Re: [Matplotlib-users] Omitting curves from a legend

2007-04-16 Thread Eric Firing
Maybe I should make _nolegend_ the default for contour and contourf collections? Eric John Hunter wrote: > On 4/13/07, Bill Baxter <[EMAIL PROTECTED]> wrote: >> There are a couple things about legend that I'm finding a little >> irksome. Is there some better way t

[Matplotlib-users] Orientation of contour-values

2014-02-03 Thread Sappy85
Hello, i've made a (filled) contour plot with matplotlib-pyplot. First i use contour() and after that contourf(). My question: the contour-values on the lines have all different orientations. Is it possible to align alle values horizontal (linke normal text)? Thanks, Sappy85 -- View

Re: [Matplotlib-users] Combining pcolormesh and contour

2012-02-28 Thread Andreas H.
>>> >>>>>>> Good morning, >>>>>>> >>>>>>> I'm creating the attached plot using pcolormesh(). What I would like to >>>>>>> do now is draw contour lines at +/- 2.5%, which follow the grid edges. >

[Matplotlib-users] Offset details for contour plot

2008-02-06 Thread Dan Karipides
I'm considering using Matplotlib to programmatically generate images for a web-based application. I want some specific information about contour plot images produced by Matplotlib and I was wondering if it was easy/possible to get this information. Imagine a contour plot rendered to a

[Matplotlib-users] Selectable contour(f) divisions

2010-02-11 Thread Bruce Ford
In using the contour as in: contour(X,Y,Z,N) N is a number of automatically chosen levels. I would like to contour based on data divisions. For instance, perhaps I'd like to use a contour or color-fill (contourf) every 2 units. I'm not seeing how to accomplish this. Any points in

[Matplotlib-users] contour coordinates

2009-01-27 Thread Eli Brosh
Hello, I am trying to extract the coordinates of contour lines. I tried the following: cs = *contour*(Z) for lev, col in zip(cs.levels, cs.collections): s = col._segments that I found in a previous post (title "contouring", by Jose Gómez-Dans-2<http://www.nabble.com/user/Us

Re: [Matplotlib-users] Omitting curves from a legend

2007-04-16 Thread Bill Baxter
Ok. Thanks. I'll give the setp on the ContourSet thing a try. Documentation issue/question: I figured there was probably some way to set attributes individually using the return value from contour since contour's docstring helpfully tells me that countour returns a ContourSet object

Re: [Matplotlib-users] contourf question

2007-10-04 Thread [EMAIL PROTECTED]
dary between the two regions such that it matches that found by contour? For the moment, a suitable workaround seems to be to do contourf(a,1,colors=('w','k')) where the background colour is white. This generates what I'm after. I notice also that linewidths is mentio

[Matplotlib-users] plot order

2008-01-23 Thread Jordan Dawe
Ok, I've spent a while searching through the mailing list archives and I can't find an answer for this relatively simple problem. I've plotted a series of contourf and contour plots on the same axes. First I plot a contourf. Next a contour on top of it. Then I want a contourf pl

Re: [Matplotlib-users] contourf question

2007-10-04 Thread Eric Firing
possible to trick > contourf into generating a single boundary between the two regions such that > it matches that found by contour? > Now I see the problem; this is something of a corner case, but it may be pointing to a bug. Where do you really want the line to fall? Do you need to specify

Re: [Matplotlib-users] Omitting curves from a legend

2007-04-16 Thread John Hunter
On 4/13/07, Bill Baxter <[EMAIL PROTECTED]> wrote: > There are a couple things about legend that I'm finding a little > irksome. Is there some better way to do this? > > 1) if you have a contour, legend() wants to add all the contours to > the list. calling con

[Matplotlib-users] contour question

2008-03-11 Thread humufr
Hello, I'm using a svn version of matplotlib and the API changed for contour. I want to have the coordinate of the contour. Before Eric Firing (I think) gave a solution to do it: val = contour(xRange,yRange,delchi2,[1]) t = asarray(val.collections[0].get_verts()) bu

[Matplotlib-users] Contour of Number of Occurences in a Scatter Plot

2009-08-21 Thread mkoss
Does anyone know how to do a contour plot of a set of X,Y data where each contour level has the same number of data points inside it? What I want to show is where most of the data is appearing in the x, y position for a scatter plot of ~1,000 points, so you can't just plot all those as p

[Matplotlib-users] plotting a contour from dicrete data points

2007-06-30 Thread Viraj Vajratkar
hello ppl, hey i hav 3 .dat files... one has 1 column of x coords, another has 1 column of the same number of y coords and the last .dat file has the same number of corresponding values of a property[temperature] at those points in 1 column i was wondering how i cud make a contour of this

Re: [Matplotlib-users] Combining pcolormesh and contour

2012-02-28 Thread Andreas H.
>> On Tuesday, February 28, 2012, Andreas H. wrote: >> >>> Good morning, >>> >>> I'm creating the attached plot using pcolormesh(). What I would like to >>> do now is draw contour lines at +/- 2.5%, which follow the grid edges. >>> &g

[Matplotlib-users] Pyplot contour plot - clabel padding

2014-12-04 Thread Sappy85
I have trouble with matplotlib / pyplot / basemap. I plot contour lines (air pressure) on a map. I use clabel to show the value of the contour lines. But the problem: the padding between the value and the contour line is too much. I have found the parameter "inline_spacing", which i h

[Matplotlib-users] selecting part of a contour to plot

2010-06-22 Thread Jonathan Slavin
To all: I'm making a plot with an image and a contour on it. I use only one level in the call to contour, but it results in two distinct contours, an inner closed one and an outer open one. I want to plot only the outer piece. How might I go about that? I've been looking at the pro

Re: [Matplotlib-users] problem with contour labels with logarithmic axis

2011-09-13 Thread Jonathan Slavin
Answering my own question... It's a question of order. I needed to set_yscale('log') before calling clabel. Jon > Hi all, > > I've run into a problem with a contour plot that has a > logarithmic > y-axis. The spacing

[Matplotlib-users] Custom contour labels?

2007-08-06 Thread Zelakiewicz, Scott (GE, Research)
Hi, I am trying to make a contour plot using custom labels that consist only of text strings but can not figure it out. For example, if I do the following: A=arange(100) A=A.reshape(10,10) CS=contour(A,[50,]) clabel(CS) I get one contour line as expected, but instead of printing the contour

[Matplotlib-users] Different contours in contour and contourf

2006-12-08 Thread Yannick Copin
Hi, running the simple test code: from pylab import * X, Y = meshgrid(linspace(-3,3,11),linspace(-3,3,11)) Z = randn(*X.shape) lev = linspace(Z.min(),Z.max(),11)[1:-1] contourf(X,Y,Z, lev, extend='both') contour(X,Y,Z, lev, colors='k') show() you will probably notic

Re: [Matplotlib-users] contour overlapping

2009-05-13 Thread Matthias Michler
2., 2., 2.], [ 1., 0., 2., 2.], [ 1., 1., 0., 2.], [ 1., 1., 1., 0.]]) With that matrix3 holds elements of matrix2 in the upper part and elements of matrix1 below the diagonal. This one could be plotted with contour or contourf. Is that what you want? best regar

Re: [Matplotlib-users] contourf question

2007-10-04 Thread [EMAIL PROTECTED]
> > contourf into generating a single boundary between the two regions such > > that it matches that found by contour? > > > Now I see the problem; this is something of a corner case, but it may be > pointing to a bug. > > Where do you really want the line to

Re: [Matplotlib-users] Combining pcolormesh and contour

2012-02-28 Thread Eric Firing
On 02/28/2012 06:28 AM, Andreas H. wrote: >>> On Tuesday, February 28, 2012, Andreas H. wrote: >>> >>>> Good morning, >>>> >>>> I'm creating the attached plot using pcolormesh(). What I would like to >>>> do now is draw contou

Re: [Matplotlib-users] Combining pcolormesh and contour

2012-02-28 Thread Andreas H.
Am 28.02.2012 18:56, schrieb Eric Firing: > On 02/28/2012 06:28 AM, Andreas H. wrote: >>>> On Tuesday, February 28, 2012, Andreas H. wrote: >>>> >>>>> Good morning, >>>>> >>>>> I'm creating the attached plot using pco

Re: [Matplotlib-users] Combining pcolormesh and contour

2012-02-28 Thread Eric Firing
;>>>>> I'm creating the attached plot using pcolormesh(). What I would like to >>>>>> do now is draw contour lines at +/- 2.5%, which follow the grid edges. >>>>>> >>>>>> The problem is that when I use contour(), the lines

[Matplotlib-users] contour and contourf order

2007-04-13 Thread Jordan Dawe
So I've got a plot with a contour and a contourf on it. The contour always appears on top of the contourf, no matter what order I issue the commands in; I want to use the contourf to block out part of the contour. ContourSets don't appear to have a zorder. How do I do thi

[Matplotlib-users] colormap extractions

2011-04-11 Thread fireproofboots
Hey, I'm using matplot lib to make surface and contour plots of different functions based on the set of data. (so I have a surface plot thats basically f1(x,y) and a contour thats f2(x,y)) I want to color the surface plot with the exact colors that are shown in the contour plot. (The su

Re: [Matplotlib-users] Contour, numbering contourlones

2007-08-06 Thread Jouni K . Seppänen
browse previous postings to matplotlib-users > without looking month by month? For example can I bring up all > postings regarding 'contour'? This was discussed recently: http://thread.gmane.org/gmane.comp.python.matplotlib.general/9915/focus=9917 You can search the list on a

[Matplotlib-users] contour lines not hidden by patches

2009-08-25 Thread Auré Gourrier
Can't figure this out: I create a figure, add some axes, define data to be plotted as a contourf + contour on top and then add some patches to hide some regions of my plot. The patches hide the contourf correctly, as expected, but not the contour lines... Could someone telle me whethe

[Matplotlib-users] Masked nan

2006-12-21 Thread Paul Novak
to plot it using contour(), I get the following errors: /usr/lib/python2.4/site-packages/numpy/core/ma.py:604: UserWarning: Cannot automatically convert masked array to numeric because data is masked in one or more locations. warnings.warn("Cannot automatically convert masked arr

[Matplotlib-users] Contour/Contourf misunderstanding?

2008-12-10 Thread Andrea Gavana
Hi All, I am trying to create a contour map with matplotlib. I have modified the source code for the contour sample which comes with the matplotlib 0.98.3 online documentation: I am using the "contour(X, Y, Z, V)" API call and, as the docs say: """ contour(X,Y,Z,V)

[Matplotlib-users] Contour: label cumulative value

2014-05-23 Thread Hong Xu
Hi, Is it possible to label cumulative value in a contour? I'm currently plotting a probability distribution by using gaussian_kde[1], but what I really care is the 0.68 percentage contour. So instead of label the local value on a contour, is it possible to label a cumulative value? T

Re: [Matplotlib-users] How to remove a contour plot?

2011-11-07 Thread Benjamin Root
On Sat, Nov 5, 2011 at 3:52 PM, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com> wrote: > I suppose it is possible to delete all collections one by one, but that's > an ugly solution. And as I'm not aware of the behind the scenes work done > by contour it's a

[Matplotlib-users] problem with colorbar of contour

2007-11-21 Thread Martinho MA
Hello, I have a contour with a clim smaller than the limits of my data... and because of this there is an error when I try to add a colorbar. Can someone help? Thanks MMA eg: x=arange(20) y=arange(30) x,y=meshgrid(x,y) v=sqrt(x+y) # max=6.928, min=0.0 # next is ok figure() contour(x,y,v) clim

Re: [Matplotlib-users] Update a contour plot

2009-09-28 Thread Matthias Michler
Hi Ralph, I don't think there exists a function like the line-'set_data'-method for collections, which are generated by 'contour'. This particular method of lines only changes the data but leave anything else unchanged. I attached an easy approach of updating a contour

[Matplotlib-users] problems with labeling contour lines - 2nd try

2008-08-11 Thread Mark Bakker
Hello - I have two problems labeling contour lines in 0.98.3. First, when I call clabel, it removes all contours that are not labeled (because the label doesn't fit on the section of contour, I presume). This seems like a bug to me (or a really odd feature). Easy example: >>>

Re: [Matplotlib-users] Updating a colorbar

2012-07-02 Thread Eric Firing
On 06/27/2012 09:12 PM, Mads Ipsen wrote: > Hi, > > Suppose you do this: > > axes = self.figure().get_axes() > contour = axes.contourf(x,y,z) > colorbar = self.figure().colorbar(contour) > > Suppose that the contour data changes, can you update the colorbar with >

[Matplotlib-users] jagged edges on masked contour plots

2006-07-18 Thread John Pye
Hi all I have an application requiring that I do contour plots for masked data. At the edge of my contour plots, I'm getting fragmented contours due to missing points on the corner of a cell in my grid. Is there any way that the contour drawing code can be set up so that it plots contours

Re: [Matplotlib-users] contour plots with logarithmic axes

2010-01-11 Thread Eric Firing
Jae-Joon Lee wrote: > Contour will work as expected if the axes is in log scale. See below. > > z = np.arange(100).reshape((10,10)) > x = np.logspace(0, 4, 10) > y = np.logspace(0, 4, 10) > > ax1 = subplot(121) > ax1.contour(np.log10(x), np.log10(y), z) > > ax2 =

[Matplotlib-users] Unwanted lines between contourf() contour levels

2009-11-11 Thread Ryan Neve
Hello, In my filled contour plot: http://imgur.com/vXoCL.png There are faint lines between the contour levels. I think they are yellow since they disappear in the yellow parts of the graph and are most obvious in the red areas. Is there any way to get rid of these lines? The number of contour

[Matplotlib-users] Combining pcolormesh and contour

2012-02-28 Thread Andreas H.
Good morning, I'm creating the attached plot using pcolormesh(). What I would like to do now is draw contour lines at +/- 2.5%, which follow the grid edges. The problem is that when I use contour(), the lines drawn do not follow the grid edges but seem to be interpolated somehow. Do you ha

Re: [Matplotlib-users] update an existing contour plot with new data

2010-07-09 Thread Johannes Röhrs
Thanks a lot, this solutions seems to serve my purpose. A new method C.remove() would of course be even better. One could say the problem is solved, but why does there no method exist to update a contour plot as there is for many other plot routines, i.e. set_xdata/set_ydata for plot set_data

[Matplotlib-users] Assign labels to colorbar extensions (user or development issue)

2014-11-16 Thread j1
I am not sure if this is a user issue or a development issue. Using version 1.4.2 My code allows the user to hone in on a specific contour range, by changing the minimum and maximum of the contour and the number of levels. I am using colorbar "extend" to prevent any white patches, as th

Re: [Matplotlib-users] Contour Plotting of Varied Data on a Shape

2010-03-08 Thread gely
Christopher Barker wrote: > > Erik Schweller wrote: >> My overall goal is to generate contour plots for a wide range of input >> data. The data points are not regularly spaced and do not align to >> any grid. The data points represent measurements taken from a mod

[Matplotlib-users] contour plot confined by shapefile border

2011-06-19 Thread Lukmanul Hakim
Hello, I would like to ask for some hints and help. I am currently trying to plot a "pseudo contour" over a Basemap. This contour is confined by borders obtained from a shapefile. I can generate the contour, I can retrieve the shapefile and put them on a basemap. What I have not be

Re: [Matplotlib-users] Unwanted lines between contourf() contour levels

2009-11-12 Thread Eric Firing
Geoffrey Ely wrote: > On Nov 12, 2009, at 10:03 AM, Eric Firing wrote: >> Geoffrey Ely wrote: >>> Ryan, >>> I have noticed the same issue with contourf. It seems to be a thin >>> gap between neighboring polygons showing through. You can turn on >>&

Re: [Matplotlib-users] Combining pcolormesh and contour

2012-02-28 Thread Ryan May
On Tue, Feb 28, 2012 at 9:10 AM, Benjamin Root wrote: > On Tuesday, February 28, 2012, Andreas H. wrote: >> >> Good morning, >> >> I'm creating the attached plot using pcolormesh(). What I would like to >> do now is draw contour lines at +/- 2.5%, which follo

Re: [Matplotlib-users] contour plot without smoothing

2011-03-04 Thread S3b4st1an
Hey guys, I think I found the answer to my question: No, it is not possible to have a contour along the grid of a pcolor plot out of the box, because the contour would take the shortest path between neighbouring same-value-points in a dataset. Pcolor merely changes the representation of these

[Matplotlib-users] clabel font

2007-08-14 Thread frigoris . ma
Dear all, I am making a contour plot using matplotlib. The title and axis annotations require math symbols so I set usetex=True in the rc('text',usetex). However that made ALL texts in LaTeX (incl. contour labels) and the contour labels look not satisfying when rendered by TeX. What I

Re: [Matplotlib-users] Combining pcolormesh and contour

2012-02-28 Thread Benjamin Root
On Tuesday, February 28, 2012, Andreas H. wrote: > Good morning, > > I'm creating the attached plot using pcolormesh(). What I would like to > do now is draw contour lines at +/- 2.5%, which follow the grid edges. > > The problem is that when I use contour(), the lines dr

Re: [Matplotlib-users] Contour/Contourf misunderstanding?

2008-12-10 Thread Eric Firing
small sample to the message. Am I doing something worng in >>> my call to contour? Why I am unable to see the 20 contour I specified >>> in my vector V? >> But you can. Simply change the line below to: >>> CS = plt.contourf(X, Y, Z, V=V) >>> CS = plt.contour

Re: [Matplotlib-users] Legend for contour plots

2011-01-21 Thread Paul Ivanov
Francesco Montesano, on 2011-01-21 15:44, wrote: > Dear All, > > I am using contour plot and I am drawing different contours with > different colors and linestyles and I would like to have a legend with > a caption for each contour function used. > Here you can see an examp

Re: [Matplotlib-users] bug in labeling contour lines

2008-08-06 Thread Mark Bakker
A little follow-up. When I use keyword argument inline=False, it doesn't remove the lines without a label. So it seems that when using inline=True the unlabeled contours get a white box, but no label (because it doesn't fit) which essentially removes the entire contour. Mark On Wed, A

Re: [Matplotlib-users] contour overlapping

2009-05-14 Thread Bala subramanian
matrix2 in the upper part and elements > of > matrix1 below the diagonal. This one could be plotted with contour or > contourf. > > Is that what you want? > > best regards Matthias > > On Wednesday 13 May 2009 18:12:53 Bala subramanian wrote: > > Armin, > > I tr

[Matplotlib-users] How to remove a contour plot?

2011-11-07 Thread krastanov.ste...@gmail.com
I suppose it is possible to delete all collections one by one, but that's an ugly solution. And as I'm not aware of the behind the scenes work done by contour it's a bit dangerous. Is there a standard way to remove a contour plot? Regards S

Re: [Matplotlib-users] contour or intensity plot.

2007-09-23 Thread Jouni K . Seppänen
yadin Bocuma Rivas <[EMAIL PROTECTED]> writes: > i want to generate a contour plot [...] an example will be very > helpfull Please see examples/contour_demo.py in the matplotlib distribution and http://matplotlib.sourceforge.net/matplotlib.pylab.html#-contour -- Jouni K. S

Re: [Matplotlib-users] Contour Plotting of Varied Data on a Shape

2009-08-21 Thread Christopher Barker
Erik Schweller wrote: > My overall goal is to generate contour plots for a wide range of input > data. The data points are not regularly spaced and do not align to > any grid. The data points represent measurements taken from a model > that can take on a variety of shapes. To make

Re: [Matplotlib-users] contour coordinates

2009-01-27 Thread Jeff Whitaker
Eli Brosh wrote: > Hello, > I am trying to extract the coordinates of contour lines. > I tried the following: > > cs = *contour*(Z) > for lev, col in zip(cs.levels, cs.collections): > s = col._segments > > that I found in a previous post (title "contouring

Re: [Matplotlib-users] which interpolation type is used by contour() ?

2010-06-14 Thread Eric Firing
On 06/13/2010 10:27 PM, David Kremer wrote: >> Hi Everyone, >> I'd like to know, what is the underline mechanism that connects the > points >> of my gridded data when I use >> contour(). >> Can I control this mechanism ? No. If you want smoother contours y

Re: [Matplotlib-users] Masked nan

2006-12-21 Thread Jeff Whitaker
n, masks the array where there are nan, and tries to plot it using > contour(), I get the following errors: > > /usr/lib/python2.4/site-packages/numpy/core/ma.py:604: UserWarning: > Cannot automatically convert masked array to numeric because data > is masked in one or more loc

[Matplotlib-users] bug in labeling contour lines

2008-08-06 Thread Mark Bakker
Hello list - There seems to be a bug in labeling contour lines. When I call clabel, it removes all contours that are not labeled (because the label doesn't fit on the section of contour, I presume). This seems like a bug to me (or a really odd feature). Easy example: >>>

[Matplotlib-users] changing axes of contour plot

2008-09-12 Thread johnny_c
Hi, I have a contour plot with a log scale on the x and y axes and I would like it to read "10^1 10^2 10^3 10^4". How would I go about doing this? Here's how I'm currently making the plot.. contour( log10(x), log10(y), z ) This only displays something like "0 1

[Matplotlib-users] update an existing contour plot with new data

2010-07-09 Thread Johannes Röhrs
Hi, I have some troubles updating a contour plot. I reduced my code to a simple example to reproduce the problem: [code] from pylab * import scipy as sp x=sp.arange(0,2*sp.pi,0.1) X,Y=sp.meshgrid(x,x) f1=sp.sin(X)+sp.sin(Y) f2=sp.cos(X)+sp.cos(Y) figure() C=contourf(f1) show() C.set_array

Re: [Matplotlib-users] contour and contourf order

2007-04-13 Thread Eric Firing
Jordan Dawe wrote: > So I've got a plot with a contour and a contourf on it. The contour > always appears on top of the contourf, no matter what order I issue the > commands in; I want to use the contourf to block out part of the > contour. ContourSets don't appear to ha

Re: [Matplotlib-users] Omitting curves from a legend

2007-04-18 Thread Eric Firing
Bill Baxter wrote: > There are a couple things about legend that I'm finding a little > irksome. Is there some better way to do this? > > 1) if you have a contour, legend() wants to add all the contours to > the list. calling contour(...,label='_nolegend_') doesn

[Matplotlib-users] updating an existing plot

2007-05-29 Thread Trevis Crane
Hi, I'm making contour plots of a field distribution, and overlaid on that is a grid that I create using hlines() and vlines(). I want to change the contour plot many times, but keep the grid the same. Right now, I have clear the axes with cla() then plot the new contour and replot the

Re: [Matplotlib-users] clabel font

2007-08-15 Thread Darren Dale
On Tuesday 14 August 2007 07:18:58 am [EMAIL PROTECTED] wrote: > Dear all, > > I am making a contour plot using matplotlib. The title and axis annotations > require math symbols so I set usetex=True in the rc('text',usetex). > However that made ALL texts in LaTeX (incl.

Re: [Matplotlib-users] labeling contours with roman numerals

2007-12-14 Thread Mark Bakker
Michael - This trick for replacing contour labels with a string was posted a little while back (by someone else):* * class FormatFaker(object): def __init__(self, str): self.str = str def __mod__(self, stuff): return self.str A=arange(100).reshape(10,10) CS=contour(A,[50,]) CS.clabel(fmt

Re: [Matplotlib-users] how can i make a contour plot with mask

2006-12-17 Thread [EMAIL PROTECTED]
east when the masked region > isn't too complicated). The basemap toolkit can plot data on map > projections with coastlines and political boundaries (as in the PyNGL > example you forwarded). > > -Jeff Thanks Jeff.Following your advice I have successed to get a masked contour

[Matplotlib-users] Broken contour lines

2011-08-13 Thread Özgür
Hi, when I use the function "contour" sometimes I get a broken contour line. This should be continuous. Probably this is a bug. Does anyone know anything about this issue? Regards, Ozgur -- FREE DOWNLOAD - ub

[Matplotlib-users] Can mpl adjust scale while doing contour?

2007-12-08 Thread hewj
I wanna my contour to display at the certain pixels and only set figure size can't do this job. Is there any way to get the scale value while mpl doing contour, and more, to change it? Great thanks for your replies. - S

Re: [Matplotlib-users] contour coordinates

2009-01-27 Thread Patrick Marsh
On Tue, Jan 27, 2009 at 5:33 PM, Jeff Whitaker wrote: > Eli Brosh wrote: >> Hello, >> I am trying to extract the coordinates of contour lines. >> I tried the following: >> >> cs = *contour*(Z) >> for lev, col in zip(cs.levels, cs.collections): >>

Re: [Matplotlib-users] contour plot confined by shapefile border

2011-06-19 Thread Benjamin Root
On Sunday, June 19, 2011, Lukmanul Hakim wrote: > Hello, > > I would like to ask for some hints > and help. I am currently trying to plot a "pseudo contour" over a Basemap. > This contour is confined by borders obtained from a shapefile. I can generate > the

Re: [Matplotlib-users] Different contours in contour and contourf

2006-12-11 Thread Eric Firing
Yannick Copin wrote: > Hi, > > Eric Firing wrote: >>> from pylab import * >>> X, Y = meshgrid(linspace(-3,3,11),linspace(-3,3,11)) >>> Z = randn(*X.shape) >>> lev = linspace(Z.min(),Z.max(),11)[1:-1] >>> contourf(X,Y,Z, lev, extend='both

[Matplotlib-users] Structure of contour object returned from tricontourf

2014-10-25 Thread Hartmut Kaiser
All, We try to generate contour polygons from an unstructured triangular grid stored in a netcdf file: import netCDF4 import matplotlib.tri as tri # read data var = netCDF4.Dataset('filename.cdf').variables x = var['x'][:] y = var['y'][:] elems = var[

[Matplotlib-users] Possible To Contour Around 1-Sigma Curves?

2009-07-28 Thread Joseph Smidt
I have a function on a 2d grid that looks like a skewed mound. I would like to make a contour plot where each contour represents each sigma, or confidence interval. I.e. Is there a straight forward way to make such a contour plot where it is then easy to say: This line is 1-sigma or 68

Re: [Matplotlib-users] contours on unstructured triangle meshes

2008-10-12 Thread Jeff Whitaker
Ian Curington wrote: > Does anyone have extensions or hints on how to create high quality > vector contour plots on unstructured triangle meshes, with values at > nodes? I can convert to structured with griddata, but I much prefer to > get a direct contour from the original trian

Re: [Matplotlib-users] Custom contour labels?

2007-08-06 Thread Jouni K . Seppänen
"Zelakiewicz, Scott (GE, Research)" <[EMAIL PROTECTED]> writes: > I get one contour line as expected, but instead of printing the contour > level (50) I would like to print a simple string like "Some String." I > tried using the fmt option of clabel, but it req

Re: [Matplotlib-users] Region within contour --> 2D array

2014-08-28 Thread Eric Firing
On 2014/08/28, 3:02 AM, Matthew Czesarski wrote: > Hi Matplotlib Users! > > > > I have some 2-d arrays, which i am displaying with implot, and deriving > contours for with contour. Easy - I'm just pulling them out of > collections[0].get_paths() . > > However

Re: [Matplotlib-users] Saving as eps file shifts image?

2010-07-22 Thread Jenna Lemonias
No, I don't think the issue is a flip in the y-axis. I have a number of different examples of this, and many in which the contour is an ellipse so I can tell that the overall positioning is correct. It seems like something is going wrong only when I save the image... Thanks for the sugge

Re: [Matplotlib-users] Masked nan

2006-12-21 Thread Darren Dale
> > When I run the attached script, which sets one value of an array to > > nan, masks the array where there are nan, and tries to plot it using > > contour(), I get the following errors: > > > > /usr/lib/python2.4/site-packages/numpy/core/ma.py:604: UserWarning: > &g

Re: [Matplotlib-users] contour question

2008-03-11 Thread Michael Droettboom
when there may be bezier curves in the path, which there won't be in the case of contours. Missing docstrings is definitely a problem that will need to be worked on. Cheers, Mike [EMAIL PROTECTED] wrote: > Hello, > > I'm using a svn version of matplotlib and the AP

Re: [Matplotlib-users] Legend for contour plots

2011-01-22 Thread Francesco Montesano
Dear Paul, Thank you, it does exacly what I want to do. I searched a bit into the "contour" instance, but I was biased since I was looking for something like "get_line". cheers Francesco 2011/1/21 Paul Ivanov : > Francesco Montesano, on 2011-01-21 15:44,  wrote: >&g

Re: [Matplotlib-users] Trouble with contour plot

2010-10-29 Thread Benjamin Root
On Fri, Oct 29, 2010 at 7:44 AM, Nikolaus Rath wrote: > Benjamin Root writes: > > On Thu, Oct 28, 2010 at 3:31 PM, Nikolaus Rath < > nikolaus-bth8mxji...@public.gmane.org> wrote: > > > >> Hello, > >> > >> I'm having a weird proble

  1   2   3   4   5   6   7   8   9   10   >