Re: [Matplotlib-users] who (F/OSS science) uses matplotlib?

2012-06-06 Thread Guillaume Gay
Le 05/06/2012 16:25, Tom Dimiduk a écrit : Is any of this stuff I should be looking to upstream or split off into the start of a scientific imaging library for python? Have you had a look at skimage https://github.com/scikits-image ? BTW I uses matplotlib (and the whole pylab suite) in my

Re: [Matplotlib-users] who (F/OSS science) uses matplotlib?

2012-06-06 Thread todd rme
On Wed, Jun 6, 2012 at 8:01 AM, Guillaume Gay guilla...@mitotic-machine.org wrote: Le 05/06/2012 16:25, Tom Dimiduk a écrit : Is any of this stuff I should be looking to upstream or split off into the start of a scientific imaging library for python? Have you had a look at skimage

[Matplotlib-users] scatter plot with constant x

2012-06-06 Thread Ulrich vor dem Esche
Hey! :o) This should be simple, but i cant manage: I need to plot many dots with the same x, like plt.plot([3,3,3,3],[60,80,120,180],'+',markersize=8,mec='k') The array for x values is silly, especially since the number of y values may be rather large. Is there a way to enter a constant there?

Re: [Matplotlib-users] scatter plot with constant x

2012-06-06 Thread Benjamin Root
On Tue, Jun 5, 2012 at 11:53 AM, Ulrich vor dem Esche ulrich.es...@googlemail.com wrote: Hey! :o) This should be simple, but i cant manage: I need to plot many dots with the same x, like plt.plot([3,3,3,3],[60,80,120,180],'+',markersize=8,mec='k') The array for x values is silly,

Re: [Matplotlib-users] scatter plot with constant x

2012-06-06 Thread Ethan Gutmann
... No, but you can do this: plt.plot([3] * 4, [60, 80, 120, 180], ...) This started from a simple enough question, but it got me thinking about what the fastest way to do this is (in case you have HUGE arrays, or many loops over them). This may be old news to some of you, but I thought

Re: [Matplotlib-users] scatter plot with constant x

2012-06-06 Thread Michael Droettboom
On 06/06/2012 12:42 PM, Ethan Gutmann wrote: ... No, but you can do this: plt.plot([3] * 4, [60, 80, 120, 180], ...) Using int16, int32, float32 get progressively slower to the default float64 case listed on line [5], changing the datatype in other methods doesn't result in nearly as

Re: [Matplotlib-users] scatter plot with constant x

2012-06-06 Thread Ethan Gutmann
On Jun 6, 2012, at 10:49 AM, Michael Droettboom wrote: Interesting result. Note, however, that matplotlib will eventually turn all data arrays into float64 at rendering time, so any speed advantage to using integers will be lost by the subsequent conversion, I suspect. I don't think it

Re: [Matplotlib-users] scatter plot with constant x

2012-06-06 Thread Michael Droettboom
On 06/06/2012 12:54 PM, Ethan Gutmann wrote: On Jun 6, 2012, at 10:49 AM, Michael Droettboom wrote: Interesting result. Note, however, that matplotlib will eventually turn all data arrays into float64 at rendering time, so any speed advantage to using integers will be lost by the subsequent

Re: [Matplotlib-users] scatter plot with constant x

2012-06-06 Thread Ethan Gutmann
On Jun 6, 2012, at 11:41 AM, Eric Firing wrote: Since we end up needing float64 anyway: In [3]: %timeit l=np.empty(1,dtype=np.float64); l.fill(3) 10 loops, best of 3: 14.1 us per loop nice, fill and empty seem to be responsible for about half the speed up each, good tools to know

Re: [Matplotlib-users] scatter plot with constant x

2012-06-06 Thread Stan West
From: Eric Firing [mailto:efir...@hawaii.edu] Sent: Wednesday, June 06, 2012 13:41 To: matplotlib-users@lists.sourceforge.net Subject: Re: [Matplotlib-users] scatter plot with constant x On 06/06/2012 06:42 AM, Ethan Gutmann wrote: ... No, but you can do this: plt.plot([3] * 4,

[Matplotlib-users] ymax

2012-06-06 Thread kamel maths
Hi, for this script: from pylab import * fig = figure() ax = fig.add_subplot(111) ax.axis('equal') x = linspace(-2, 3, 50) ax.plot(x, sin(x)) show() - If I try to get ymax with ax.get_ylim(), i obtain 1.0 whereas I observe it

Re: [Matplotlib-users] ymax

2012-06-06 Thread Tony Yu
On Wed, Jun 6, 2012 at 3:32 PM, kamel maths kamel.ma...@gmail.com wrote: Hi, for this script: from pylab import * fig = figure() ax = fig.add_subplot(111) ax.axis('equal') x = linspace(-2, 3, 50) ax.plot(x, sin(x)) show()

Re: [Matplotlib-users] ymax

2012-06-06 Thread Benjamin Root
On Wed, Jun 6, 2012 at 6:12 PM, Tony Yu tsy...@gmail.com wrote: On Wed, Jun 6, 2012 at 3:32 PM, kamel maths kamel.ma...@gmail.com wrote: Hi, for this script: from pylab import * fig = figure() ax = fig.add_subplot(111) ax.axis('equal') x =