Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Nico Schlömer <nico.schloemer@gm...>  20111213 21:03:53

Hi all, when drawing contourf plots, I inspected the underlying matplotlib.path.Path elements that determine the curves and noticed that they are all of code LINETO (see http://matplotlib.sourceforge.net/api/path_api.html#matplotlib.path.Path) although the number of vertices is 6, actually suggesting a CURVE4. Would that be a bug? Cheers, Nico 
From: Eric Firing <efiring@ha...>  20111213 22:39:46

On 12/13/2011 11:03 AM, Nico Schlömer wrote: > Hi all, > > when drawing contourf plots, I inspected the underlying > matplotlib.path.Path elements that determine the curves and noticed > that they are all of code LINETO (see > http://matplotlib.sourceforge.net/api/path_api.html#matplotlib.path.Path) > although the number of vertices is 6, actually suggesting a CURVE4. > > Would that be a bug? I don't see it. x = np.arange(9) x.shape = (3,3) cs = contourf(x, 1) print cs.collections.get_paths() This shows a set of vertices with a matching set of LINETO (after an initial MOVETO). contour and contourf generate piecewise linear paths with vertices on grid cell boundaries; they make no attempt to smooth out the contours. Eric > > Cheers, > Nico 
From: Nico Schlömer <nico.schloemer@gm...>  20111221 13:31:12
Attachments:
matplotlibcontourflines.png

> I don't see it. You're right.  I've looked at it again and I can confirm that the outlines are drawn with LINETOs. > This shows a set of vertices with a matching set of LINETO (after an > initial MOVETO). contour and contourf generate piecewise linear paths > with vertices on grid cell boundaries; they make no attempt to smooth > out the contours. I looked at the example in http://matplotlib.sourceforge.net/examples/pylab_examples/contourf_log.html and used the point information in the LINETOs to reproduce the figure. It seems that, except for the blue patches in the corners, this information is really rough. Take a peek at the file I attached; left: matplotlib rendering, right: lines manually redrawn. Do you know what's going on? Nico On Tue, Dec 13, 2011 at 11:39 PM, Eric Firing <efiring@...> wrote: > On 12/13/2011 11:03 AM, Nico Schlömer wrote: >> Hi all, >> >> when drawing contourf plots, I inspected the underlying >> matplotlib.path.Path elements that determine the curves and noticed >> that they are all of code LINETO (see >> http://matplotlib.sourceforge.net/api/path_api.html#matplotlib.path.Path) >> although the number of vertices is 6, actually suggesting a CURVE4. >> >> Would that be a bug? > > I don't see it. > > x = np.arange(9) > x.shape = (3,3) > cs = contourf(x, 1) > print cs.collections.get_paths() > > This shows a set of vertices with a matching set of LINETO (after an > initial MOVETO). contour and contourf generate piecewise linear paths > with vertices on grid cell boundaries; they make no attempt to smooth > out the contours. > > Eric > >> >> Cheers, >> Nico > > >  > Systems Optimization Self Assessment > Improve efficiency and utilization of IT resources. Drive out cost and > improve service delivery. Take 5 minutes to use this Systems Optimization > Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/ > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers 
Sign up for the SourceForge newsletter:
No, thanks