Re: [Matplotlib-users] Hardware rendering with tricontourf

2012-01-27 Thread Benjamin Root
On Fri, Jan 27, 2012 at 10:06 AM, Howard wrote: > On 1/27/12 3:39 AM, Ian Thomas wrote: > > On 26 January 2012 19:36, Howard wrote: > >> I'm rendering some images with about 3.5 million triangles into a >> 512x512 png file using tricontourf. I'm running this in a virtual machine, >> and I'm pr

Re: [Matplotlib-users] Events

2012-01-27 Thread Benjamin Root
On Fri, Jan 27, 2012 at 4:54 AM, Jerzy Karczmarczuk < jerzy.karczmarc...@unicaen.fr> wrote: > Benjamin Root answers my query concerning user-generated events : > > To answer your question, take a look at how pick_event() is declared > > in backend_bases.py: > > > > def pick_event(self, mouseev

Re: [Matplotlib-users] Events

2012-01-27 Thread Jerzy Karczmarczuk
Tony Yu suggests that my multiple and changing animation problems could be solved using coroutining. > have you looked into using a coroutine. /... /I've attached a simple > example below. > > import matplotlib.pyplot as plt > import numpy as np > def datalistener(): > ... > while True: >

Re: [Matplotlib-users] histogram plots color range

2012-01-27 Thread Tony Yu
On Fri, Jan 27, 2012 at 4:01 PM, wrote: > On Fri, Jan 27, 2012 at 12:18 PM, Tony Yu wrote: > > > > > > On Fri, Jan 27, 2012 at 11:27 AM, nahren manuel > > wrote: > >> > >> Hello , > >> I have a two dimensional array, 40X20(rowsXcolumns). Each of the 40 rows > >> themselves hold values of the bi

Re: [Matplotlib-users] histogram plots color range

2012-01-27 Thread josef . pktd
On Fri, Jan 27, 2012 at 12:18 PM, Tony Yu wrote: > > > On Fri, Jan 27, 2012 at 11:27 AM, nahren manuel > wrote: >> >> Hello , >> I have a two dimensional array, 40X20(rowsXcolumns). Each of the 40 rows >> themselves hold values of the bins of a distribution (which is not always >> normal, can exp

Re: [Matplotlib-users] histogram plots color range

2012-01-27 Thread Tony Yu
On Fri, Jan 27, 2012 at 11:27 AM, nahren manuel wrote: > Hello , > I have a two dimensional array, 40X20(rowsXcolumns). Each of the 40 rows > themselves hold values of the bins of a distribution (which is not always > normal, can expect a bimodal curve as well) > It is little difficult to explain

Re: [Matplotlib-users] Events

2012-01-27 Thread Tony Yu
On Fri, Jan 27, 2012 at 5:54 AM, Jerzy Karczmarczuk < jerzy.karczmarc...@unicaen.fr> wrote: > Benjamin Root answers my query concerning user-generated events : > > To answer your question, take a look at how pick_event() is declared > > in backend_bases.py: > > > > def pick_event(self, mouseev

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Ethan Gutmann
On Jan 27, 2012, at 9:11 AM, Fabien Lafont wrote: > Ive tried: > > for i in range(0,NbPts): >if column1[i] == nan: >column1[i].remove(nan) >column2[i].remove(nan) > > to remove these points but it doesn't work > you are close, I think what you want is: # assuming column1

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Fabien Lafont
Thanks a lot, I'll try to remove the points using isnan() 2012/1/27 Fabrice Silva : > What about masked arrays ? > http://docs.scipy.org/doc/numpy/reference/maskedarray.html > > > -- > Fabrice Silva > > > -- > Try before y

[Matplotlib-users] histogram plots color range

2012-01-27 Thread nahren manuel
Hello , I have a two dimensional array, 40X20(rowsXcolumns). Each of the 40 rows themselves hold values of the bins of a distribution (which is not always normal, can expect a bimodal curve as well) It is little difficult to explain to I actually created a sample figure: http://www.flickr.com/p

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Fabrice Silva
What about masked arrays ? http://docs.scipy.org/doc/numpy/reference/maskedarray.html -- Fabrice Silva -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft dev

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Benjamin Root
On Fri, Jan 27, 2012 at 10:11 AM, Fabien Lafont wrote: > Yes in fact it plot it well, but then I have a vector like: > [3702.13999, nan, nan, nan, 3703.79, nan, nan, nan, > 3704.69001, 3704.84001] > and it's impossible to fit it. It return 'nan'. > > Ive tried: > > for i in

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Jérôme
Fri, 27 Jan 2012 16:48:25 +0100 Fabien Lafont a écrit: > I want to plot something like: > > > X(time)Ypoints > 08 > 1 > 2 7 > 3 > 4 > 5 > 6 > 7 > 8 > 9 Sorry if I'm missing something, but can't you plot Y [8,7] against X [0,2] ? -- Jérôme -

[Matplotlib-users] (no subject)

2012-01-27 Thread nahren manuel
Dear Users, I want to plot a XY, the X-value is constant, but let assume Y varees from 1-10, so I want o have different colors accordingly for the range 0-2,2-4,4-6,6-8,8-10. thanks a lot najren -- Try before you buy = S

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Fabien Lafont
Yes in fact it plot it well, but then I have a vector like: [3702.13999, nan, nan, nan, 3703.79, nan, nan, nan, 3704.69001, 3704.84001] and it's impossible to fit it. It return 'nan'. Ive tried: for i in range(0,NbPts): if column1[i] == nan: column1[i].remove(n

Re: [Matplotlib-users] Hardware rendering with tricontourf

2012-01-27 Thread Howard
On 1/27/12 3:39 AM, Ian Thomas wrote: On 26 January 2012 19:36, Howard > wrote: I'm rendering some images with about 3.5 million triangles into a 512x512 png file using tricontourf. I'm running this in a virtual machine, and I'm pretty sure that there is no g

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Benjamin Root
On Fri, Jan 27, 2012 at 9:52 AM, Fabien Lafont wrote: > Sorry, It's an awkward manipulation. I finish the mail > > 2012/1/27 Fabien Lafont : > > I want to plot something like: > > > > > > X(time)Ypoints > > 08 > > 1 > > 27 > > 36

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Fabien Lafont
Sorry, It's an awkward manipulation. I finish the mail 2012/1/27 Fabien Lafont : > I want to plot something like: > > > X(time)        Ypoints > 0                    8 > 1 > 2                   7 > 36 > 44 > 5 > 6 > 77 > 8

[Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Fabien Lafont
I want to plot something like: X(time)Ypoints 08 1 2 7 3 4 5 6 7 8 9 -- Try before you buy = See our experts in action! The most comprehensive online learning library for M

Re: [Matplotlib-users] four colour theorem

2012-01-27 Thread Benjamin Root
On Friday, January 27, 2012, Eric Emsellem wrote: > Dear all, > > I have a set of Voronoi bins, defined by nodes (x,y) and an underlying > mesh of squared bins. > See an example here of such Voronoi bins. > > http://www.google.fr/imgres?q=voronoi+binning&hl=fr&sa=X&biw=1280&bih=665&tbm=isch&prmd=i

Re: [Matplotlib-users] Overlaying part of an matrix image on another.

2012-01-27 Thread Tony Yu
On Fri, Jan 27, 2012 at 9:13 AM, Pål Gunnar Ellingsen wrote: > Hi > > I have a array, M, which is (4Nx4M), and an array (image), im, which is > NxM. > I can currently plot the matrix as a 2d image using imshow using: > > import matplotlib.pyplot as plt > from matplotlib import cm > > # some code f

[Matplotlib-users] Overlaying part of an matrix image on another.

2012-01-27 Thread Pål Gunnar Ellingsen
Hi I have a array, M, which is (4Nx4M), and an array (image), im, which is NxM. I can currently plot the matrix as a 2d image using imshow using: import matplotlib.pyplot as plt from matplotlib import cm # some code for reading in the matrix cmap = cm.get_cmap('jet', 256) imM = plt.imshow(M, cm

Re: [Matplotlib-users] Events

2012-01-27 Thread Jerzy Karczmarczuk
Benjamin Root answers my query concerning user-generated events : > To answer your question, take a look at how pick_event() is declared > in backend_bases.py: > > def pick_event(self, mouseevent, artist, **kwargs): > ... > self.callbacks.process(s, event) > > The function that "f

[Matplotlib-users] four colour theorem

2012-01-27 Thread Eric Emsellem
Dear all, I have a set of Voronoi bins, defined by nodes (x,y) and an underlying mesh of squared bins. See an example here of such Voronoi bins. http://www.google.fr/imgres?q=voronoi+binning&hl=fr&sa=X&biw=1280&bih=665&tbm=isch&prmd=imvnsb&tbnid=zp0RRIktKlF9pM:&imgrefurl=http://www.aanda.org/art

Re: [Matplotlib-users] Hardware rendering with tricontourf

2012-01-27 Thread Ian Thomas
On 26 January 2012 19:36, Howard wrote: > I'm rendering some images with about 3.5 million triangles into a 512x512 > png file using tricontourf. I'm running this in a virtual machine, and I'm > pretty sure that there is no graphics rendering hardware being used. Is it > possible, assuming the ha