Re: [Matplotlib-users] 3d performance question

2012-12-14 Thread Ethan Gutmann
Hi Neal, my understanding is that matplotlib does not use OpenGL (thus the terrible performance you see). You might want to look into glumpy for mplot3d OpenGL acceleration. Ethan On Dec 14, 2012, at 5:23 AM, Neal Becker ndbeck...@gmail.com wrote: I'm using fedora (17) linux. I notice on

Re: [Matplotlib-users] plot_surface does not work

2012-12-11 Thread Ethan Gutmann
This is because the default rstride and cstride arguments is 10, IIRC. Since your array is only 12x12, the surface plotting is barely plotting anything. Try calling: ax.plot_surface(x, y, a, rstride=1, cstride=1) You know, this has tripped me up a few times too. I don't use

Re: [Matplotlib-users] Plot multiple lines

2012-11-15 Thread Ethan Gutmann
1. How to open excel file in python? You can read excel files with the xlrd module : http://www.python-excel.org/ However, you may want to simply read your exported CSV files. 2. I would like to plot multiple line joining the positions of each of the events, it is possible to do this? Have

Re: [Matplotlib-users] 3d surfaces in basemap?

2012-10-27 Thread Ethan Gutmann
Hi Andreas, Someone else, please correct me if I'm wrong, but I think the only way to do this is to provide your own facecolors map. Pick your preferred color map and apply it to dataset B, then now use mplot3d plot_surface(X,Y,Z_A,facecolors=B_colors). Assuming you are running inside pylab

Re: [Matplotlib-users] Format date tick labels

2012-10-12 Thread Ethan Gutmann
On Oct 11, 2012, at 2:58 PM, Benjamin Root wrote: On Thu, Oct 11, 2012 at 4:53 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 11/10/2012 10:55, Damon McDougall wrote: Am I missing something here? Are seconds just floats internally? A delta of 1e-6 is nothing (pardon the pun). A

Re: [Matplotlib-users] Format date tick labels

2012-10-12 Thread Ethan Gutmann
On Oct 12, 2012, at 4:15 PM, Mark Lawrence wrote: On 12/10/2012 20:38, Ethan Gutmann wrote: I'm a little confused by this attitude. I recognize that there are issues around dates, I've written a few date libraries myself to get around insane excel date issues (pop quiz for anyone at MS

Re: [Matplotlib-users] MemoryError with NetCDF

2012-09-07 Thread Ethan Gutmann
On Sep 7, 2012, at 11:04 AM, Eric Firing wrote: On 2012/09/07 4:00 AM, Benjamin Root wrote: On Fri, Sep 7, 2012 at 9:49 AM, Shahar Shani-Kadmiel kadm...@post.bgu.ac.il mailto:kadm...@post.bgu.ac.il wrote: On Sep 7, 2012, at 4:25 PM, Benjamin Root wrote: On Fri, Sep 7, 2012

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 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 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] Focus in OSX

2012-04-11 Thread Ethan Gutmann
On Apr 11, 2012, at 2:19 PM, Chris Laumann wrote: I get the exact same behavior from both Enthought supplied python and Apple supplied python. I haven't tried any other pythons, but it isn't limited to the Apple one. C I've never seen quite what has been described, but I've had issues

Re: [Matplotlib-users] How matplotlib got me a job

2012-02-07 Thread Ethan Gutmann
On Feb 7, 2012, at 1:42 AM, Friedrich Romstedt wrote: I'd like to thank John and Ben for this inspiring posts, which showed them from a side I've never seen so far. Show your hands if you're thinking the same. I hope I didn't bore you all :-) Well said Friedrich, though I'm a relative

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 and 2

Re: [Matplotlib-users] using solid colours in surface plots

2012-01-09 Thread Ethan Gutmann
Along these lines, it looks to me like plot_surface is not shading when I would expect it to (maybe I just have the wrong expectations?) I would expect the following to create a surface with colors from the colormap but shading from a lightsource. surf = ax.plot_surface(X, Y, Z,

Re: [Matplotlib-users] matplotlib 3D: interpolated shading

2011-10-05 Thread Ethan Gutmann
Holger, for what it is worth, you can hack this fairly easily. Run the code twice once with colors, once with shading. Take the output from both as images, the convert both images to HSV, the recombine the HS components from the color version with the V component of the shaded version. I haven't

Re: [Matplotlib-users] how to hide axes in a 3D plot

2011-09-07 Thread Ethan Gutmann
I see the same thing here (from within ipython -pylab), and moving the ax.set_axis_off() immediately after the add_subplot call doesn't change anything. Interacting with the plot doesn't change anything either. Ethan On Sep 7, 2011, at 1:21 PM, Benjamin Root wrote: On Wed, Sep 7, 2011

[Matplotlib-users] Moving plot windows?

2011-09-06 Thread Ethan Gutmann
Hi, I'm trying to move plot windows programmatically, or at least control where a new window opens. At the moment, every new window opens 20px further down/right from the previous new window, but can I tell it to open e.g. 0px down and 100px right? Or can I move it after it opens? I've dug