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

2011-04-28 Thread Jason Grout
On 4/28/11 9:03 PM, gary ruben wrote: > http://stackoverflow.com/questions/1920145/how-to-find-duplicate-elements-in-array-using-for-loop-in-python-like-c-c > i.e. > dups = [x for x in list_a if list_a.count(x)> 1] That involves iterating through your list_a a number of times to look for element

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

2011-04-28 Thread gary ruben
If you generate a big list of all the edges from the triangle data, you should get repeat entries only for all the internal edges. You could then find all the duplicates using this recipe http://stackoverflow.com/questions/1920145/how-to-find-duplicate-elements-in-array-using-for-loop-in-python-lik

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

2011-04-28 Thread Luke
Ian, Thanks for the response and the example code. I guess what I'm trying to do might be well defined. Here is a plot that should illustrate the data I'm working with: http://biosport.ucdavis.edu/blog/copy_of_steady_benchmark_tau.png The green and red regions are being displayed by plotting

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

2011-04-28 Thread Ian Thomas
On 28 April 2011 08:51, Luke wrote: > I have a set of unstructured (x,y) points which I would like to > compute a boundary polygon for. I don't want the convex hull. > > I was able to use matplotlib.tri to get a Delaunay triangulation for > my points by following the examples online, but I'm hav

[Matplotlib-users] Search for a row with a pattern in a column

2011-04-28 Thread Pau
Hi, I am trying to "grep" in 650 data files a row which has a particular number on column 2, namely " 0.250E+00 ". Alternatively, I could look for that row by searching for the first column, which is " 1 ". Unfortunately, this row changes position in the 650 files and looks like this

Re: [Matplotlib-users] use $1 for name of file plt.savefig

2011-04-28 Thread Wes McKinney
On Thu, Apr 28, 2011 at 1:01 PM, Wes McKinney wrote: > On Thu, Apr 28, 2011 at 12:55 PM, Pau wrote: >> Hi, >> >> I am trying to use recursively a matplotlib script to create 650 plots. >> >> For this, I have defined >> >> cluster = loadtxt(sys.argv[1]) >> MBH     = loadtxt ('./TrajectoryMBH.asc')

Re: [Matplotlib-users] use $1 for name of file plt.savefig

2011-04-28 Thread Pau
thanks! On 28 April 2011 19:01, Wes McKinney wrote: > On Thu, Apr 28, 2011 at 12:55 PM, Pau wrote: >> Hi, >> >> I am trying to use recursively a matplotlib script to create 650 plots. >> >> For this, I have defined >> >> cluster = loadtxt(sys.argv[1]) >> MBH     = loadtxt ('./TrajectoryMBH.asc')

Re: [Matplotlib-users] use $1 for name of file plt.savefig

2011-04-28 Thread Wes McKinney
On Thu, Apr 28, 2011 at 12:55 PM, Pau wrote: > Hi, > > I am trying to use recursively a matplotlib script to create 650 plots. > > For this, I have defined > > cluster = loadtxt(sys.argv[1]) > MBH     = loadtxt ('./TrajectoryMBH.asc') > > X_cl = cluster[:, 2]  # Column 3 > Y_cl = cluster[:, 3]  #

[Matplotlib-users] use $1 for name of file plt.savefig

2011-04-28 Thread Pau
Hi, I am trying to use recursively a matplotlib script to create 650 plots. For this, I have defined cluster = loadtxt(sys.argv[1]) MBH = loadtxt ('./TrajectoryMBH.asc') X_cl = cluster[:, 2] # Column 3 Y_cl = cluster[:, 3] # Column 4 Z_cl = cluster[:, 4] # Column 5 X_mbh = MBH[:, 2] #

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

2011-04-28 Thread Luke
I have a set of unstructured (x,y) points which I would like to compute a boundary polygon for. I don't want the convex hull. I was able to use matplotlib.tri to get a Delaunay triangulation for my points by following the examples online, but I'm having trouble masking everything but the triangle