Re: [Matplotlib-users] How can I visualize a landscape which I have sample heights of?

2015-06-25 Thread Ian Thomas
The mplot3d tutorial page, which is the first result when you google 'mplot3d', includes a section on 'Tri-surface plots' and is precisely what you are looking for. You certainly do not need to use scipy. Matplotlib includes its own Delaunay triangulator, as specified in the 'triangular grids'

Re: [Matplotlib-users] How to plot other than rectangular grid?

2014-11-22 Thread Ian Thomas
Masha, As suggested before, take a look at the triangular mesh functions. There are simple contour ( http://matplotlib.org/examples/pylab_examples/tricontour_demo.html) and pcolor plots ( http://matplotlib.org/examples/pylab_examples/tripcolor_demo.html), plus linear and cubic interpolation (

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

2014-11-04 Thread Ian Thomas
On 2 November 2014 16:30, Benjamin Root ben.r...@ou.edu wrote: Would it make sense to at least emit a warning when a mask is encountered. There are very few places in matplotlib where masked arrays are not allowed (I think histograms is the other spot, but I can't remember for sure). Ben,

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

2014-11-02 Thread Ian Thomas
On 1 November 2014 18:20, Hartmut Kaiser hartmut.kai...@gmail.com wrote: Thanks Ian! Your detailed answer is much appreciated. As you might have already guessed, we have quite some problems creating clean geometries from the generated contour data. I have tried to put together one

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

2014-10-26 Thread Ian Thomas
On 26 October 2014 00:18, Hartmut Kaiser hartmut.kai...@gmail.com wrote: At this point we assume, that polys[0] is a linear ring to be interpreted as a polygon exterior and polys[1:] are the corresponding interiors for polys[0]. Here are our questions: Is this assumption correct? Is

Re: [Matplotlib-users] Crash when using matplotlib.tri.LinearTriInterpolator

2014-08-12 Thread Ian Thomas
less RAM would be preferable. There are various possibilities, they just have to be implemented! I will take a look at it sometime, but it probably will not be soon. Ian Thomas

Re: [Matplotlib-users] Crash when using matplotlib.tri.LinearTriInterpolator

2014-08-11 Thread Ian Thomas
look to check there is not something else going wrong. Ian Thomas -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists

Re: [Matplotlib-users] Bug in contourf or BoundaryNorm?

2014-03-28 Thread Ian Thomas
On 28 March 2014 12:56, Jesper Larsen jesper.webm...@gmail.com wrote: I believe the normalization behaviour is wrong for contourf at least when using a BoundaryNorm. In the script below I am using the same norm to plot the same data using contourf and pcolormesh. The color should change around

Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-29 Thread Ian Thomas
On 29 January 2014 03:21, Eric Firing efir...@hawaii.edu wrote: On 2014/01/28 10:01 AM, A Short wrote: Hi - Ive now improved my code and confirmed the use of the right grib file but i cant for the life of me figure out the missing data near the coastline..? Could anyone help? The

Re: [Matplotlib-users] Limiting interpolation of map plot with tricontourf

2013-11-01 Thread Ian Thomas
On 1 November 2013 13:55, Jule rik...@gmx.de wrote: Hey guys, I have a question regarding my plot. http://matplotlib.1069221.n5.nabble.com/file/n42446/seaice.png I want to plot seaice thickness distribution. The data is derived from a model run using an unstructured grid. To plot data on a

Re: [Matplotlib-users] Build failure

2013-10-28 Thread Ian Thomas
On 26 October 2013 09:02, Nils Wagner nils...@googlemail.com wrote: The problem persists in master. On Fri, Aug 30, 2013 at 7:39 PM, Nils Wagner nils...@googlemail.comwrote: You are right. The first one fails, the second works for me. Nils On Fri, Aug 30, 2013 at 7:20 PM, Michael

Re: [Matplotlib-users] bisecting triangulation

2013-07-02 Thread Ian Thomas
On 1 July 2013 13:40, zetah ot...@hush.ai wrote: Hi, I have set of points in a plane and make triplot: subplot(121) plot(points[:,0], points[:,1], 'o') title('Set of points') subplot(122) triplot(points[:,0], points[:,1]) title('Triangulation') result:

Re: [Matplotlib-users] griddata fails

2013-01-09 Thread Ian Thomas
On 9 January 2013 09:32, Shahar Shani-Kadmiel kadm...@post.bgu.ac.ilwrote: Hi, I'm trying to contour some data that I have and the griddata line fails. I tried running it on some synthetically generated data and I get the same IndexError. Any Ideas? Here is the example with the synthetic

Re: [Matplotlib-users] Gap when using contourf and nan's

2012-11-17 Thread Ian Thomas
On 16 November 2012 15:38, Bror Jonsson brorl...@gmail.com wrote: Oh, I left out a line in the code, very sorry for that. Here is a full example: import numpy as np import pylab as pl #Generate a matrix populated with 1's fld = np.ones((4,4)) #Set one corner of the matrix to NaN

Re: [Matplotlib-users] Gap when using contourf and nan's

2012-11-15 Thread Ian Thomas
? Ian Thomas -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial

Re: [Matplotlib-users] Clipping Contours

2012-10-17 Thread Ian Thomas
On 16 October 2012 18:44, T J tjhn...@gmail.com wrote: This is a set of 152 points on a triangle. delaunay is mentioned to have problems for some pathological cases. Is a complete triangular grid considered as such a case? Yes, under certain circumstances! delaunay is not 'geometrically

Re: [Matplotlib-users] [matplotlib-devel] Bug in Triangulation causes infinite loop if 4 or more duplicate points are used in tricontour()

2012-04-17 Thread Ian Thomas
On 16 April 2012 23:36, Damon McDougall d.mcdoug...@warwick.ac.uk wrote: On Monday, 16 April 2012 at 16:34, Kacper Kowalik wrote: On 16 Apr 2012 22:31, Damon McDougall d.mcdoug...@warwick.ac.uk wrote: Hi Kacper, Just to be clear, is it tri.Triangulation(x, y) that hangs, or is it

Re: [Matplotlib-users] Hardware rendering with tricontourf

2012-01-27 Thread Ian Thomas
that use hardware rendering. There has been some work done on an OpenGL backend, but I am not sure of the status of this. The last time I checked it was pretty experimental. Perhaps someone involved with it can comment on its current status. Ian Thomas

Re: [Matplotlib-users] Triangulations and Polar Plots

2011-11-15 Thread Ian Thomas
On 15 November 2011 00:18, Daniel Welling dantwell...@gmail.com wrote: Greetings. I recently found myself in the position of needing to plot polar, irregularly spaced data. I've done similar using regularly spaced values with no problem. However, I've found that when the points become

Re: [Matplotlib-users] Triangulation objects

2011-11-14 Thread Ian Thomas
On 13 November 2011 19:10, Daniel Welling dantwell...@gmail.com wrote: I am interested in accessing Triangulation objections that are created by MPL for tricontour-type plots. The docs for MPL routines that use triangulation objects refer to documentation, but none exists in the MPL online

Re: [Matplotlib-users] Inner boundaries in tricontourf

2011-08-31 Thread Ian Thomas
be overkill for what you want to do. Ian Thomas -- Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free Love Thy Logs t-shirt

Re: [Matplotlib-users] Inner boundaries in tricontourf

2011-08-31 Thread Ian Thomas
a modified version of your debug.py to show this. This may be simpler to use than points_inside_poly, but if you have multiple nested boundaries it could get confusing unless you know which boundary encloses which others. Ian Thomas import matplotlib import matplotlib.pyplot as plot import numpy

Re: [Matplotlib-users] Change color for fill_between to contour plot

2011-07-09 Thread Ian Thomas
Try tricontourf; I've attached an example. Most of the example code is manipulating your input data and calculating the connectivity of your grid. I hope this helps, Ian Thomas import matplotlib.pyplot as plt import numpy as np x,y1,y2,y3,y4,stress = np.loadtxt('data.txt', skiprows=2, delimiter

Re: [Matplotlib-users] Boundary edges of a set of points

2011-04-29 Thread Ian Thomas
On 28 April 2011 22:56, Luke hazelnu...@gmail.com wrote: I am thinking that perhaps the approach I should be taking should involve contouring the real part of the eigenvalues which determine the stability, and then plot the zero-level curve. I'll have to think about that some more. This

Re: [Matplotlib-users] Boundary edges of a set of points

2011-04-28 Thread Ian Thomas
come up with their own freestanding example. I hope some of this helps! Ian Thomas import matplotlib.pyplot as plt import matplotlib.tri as tri import numpy as np # Create triangulation of random (x,y) points. np.random.seed(0) x = np.random.rand(10) y = np.random.rand(10) triang

Re: [Matplotlib-users] pyplot: Extract contourset without plotting

2011-01-27 Thread Ian Thomas
Daniel, Following on from Eric's comments, attached is the simplest example I could come up with to do what you want. For non-filled contours, the 'segs' (last few lines of the file) should be fairly self-explanatory, and this is hopefully what you want. If you are after filled contours, you

Re: [Matplotlib-users] mplot3d - ploting 3d triangular mesh model - need help

2010-11-11 Thread Ian Thomas
On 11 November 2010 12:41, isolat illoul_am...@yahoo.fr wrote: hi all, please is there any one can tell me if it's possible in mplot3d to plot 3d triangular mesh model with a colormap different from the Z variable. I don't find example in tutorial for this. thanks. No, this is not

Re: [Matplotlib-users] Problems using triplot from file

2010-09-27 Thread Ian Thomas
On 27 September 2010 15:37, radfahrer clem...@m-info.de wrote: I am trying to plot a triangular grid from a textfile using triplot, but all I get is some wired straight line Your triangulation consists of just two triangles, the first with vertices (0, 0) (0.1, 0.1) (0.1, 0.1) and the second

Re: [Matplotlib-users] Plotting 3D, Irregularly Triangulated Surfaces - An Example

2010-09-20 Thread Ian Thomas
On 17 September 2010 16:26, Simon S. Clift sscl...@gmail.com wrote: I have a data set that is in the form of an irregular 2D grid with associated values, one for each node. I would like to plot this as a raised surface, with colours that indicate the z-value. Somehow I didn't find just

Re: [Matplotlib-users] contour's polygons

2010-07-29 Thread Ian Thomas
On 28 July 2010 01:31, Phil Rosenfield philr...@astro.washington.eduwrote: I'd like to use the polygons contour makes but I can't figure out how to get them from ContourSet. Any examples or links to helpful information would be excellent. Attached is an example of how to extract the polygons

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

2010-03-15 Thread Ian Thomas
Chris Barker wrote: hmm -- I wonder if a post to matplotlib-devel is in order. Most of those folks are on this list, to, but may not be following this thread. I'll post to matplotlib-devel shortly and see what response I get. By the way, it sounds like your contouring code is in C++ -- is

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

2010-03-11 Thread Ian Thomas
Chris Barker wrote: ... snip ... To summarise, you recommend the following units of functionality: 1) Triangulation class to wrap existing delaunay code. 2) Separate the storage of and creation of contour sets so that you can create your own. 3) tricontour and tricontourf functions to contour a

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

2010-03-10 Thread Ian Thomas
Chris Barker wrote: I think it would be great to have in MPL. What code are you using for the triangulation? Does it do constrained delauney? My code only does the contouring; you have to input the triangulation. In the examples included with the code I used matplotlib.delaunay to do the

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

2010-03-09 Thread Ian Thomas
Hello all, I submitted some code to matplotlib-users last September to perform contouring of triangular grids. The posts and code can be found at: http://sourceforge.net/mailarchive/forum.php?thread_name=4AB3B95B.3090903%40noaa.govforum_name=matplotlib-users Like I wrote at the time, if it is

[Matplotlib-users] Contouring on triangular grids

2009-09-18 Thread Ian Thomas
it. If it turned out that a (much improved) version of it was considered good enough to incorporate into mpl, I'd would happily help as I'd like to contribute. I hope someone finds it useful! Ian Thomas mpl_tri.tar.gz Description: GNU Zip compressed data