[Matplotlib-users] Is Gtk draw() slow?

2008-01-15 Thread steve george
Hi, I don't have conclusive proof, .. but I suspect that the draw() of a graph in a pyGTK application is order of magnitudes slower than I can plot the same data in the default Tk graphing widget. i.e. 5 sec in tk, ... and 1 minute in gtk Obvious question, ... is this a know issue? Is

[Matplotlib-users] Missing data in a date graph

2008-01-15 Thread Lucas Di Pentima
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm starting with matplotlib, using it to build a performance monitor web application. The plots I'm using mostly are date based graphs, what's the best way to go when I have to plot some data that have gaps inside the date ranges? The

Re: [Matplotlib-users] Is Gtk draw() slow?

2008-01-15 Thread Michael Droettboom
In my own tests, using the built-in GUI windows I get the following numbers on the simple_plot_fps.py speed test (which essentially tests redrawing speed, which is pretty GUI-backend dependent, as opposed to the first drawing operation which involves more common code): GtkAgg: wallclock:

Re: [Matplotlib-users] Missing data in a date graph

2008-01-15 Thread Michael Droettboom
You can use a numpy masked array, and mask the values that you don't want to plot. Or you can use a normal numpy array and set the missing values to numpy.nan. (There seem to be a few side cases where the second option doesn't do what you would expect in 0.91.2, but AFAIK it works in recent

Re: [Matplotlib-users] Is Gtk draw() slow?

2008-01-15 Thread Michael Droettboom
Ah -- just thought of something else. If I adjust simple_plot_fps.py to have 100,000 data points rather than 1,000 I see something that starts to match with what you're seeing: GtkAgg: wallclock: 4.23297405243 user: 3.33 fps: 23.6240522057 Gtk: wallclock: 15.0203828812 user: 14.92 fps:

[Matplotlib-users] Barchart and imshow

2008-01-15 Thread chuckwhite
Hello: I need to create a chart which shows the effect of promotions (eg. forms of advertisement, discounts, etc.) on sales. The data that I have is: weekly sales -- sales[sku, week] promotions -- promotion[prom_name, day] Currently, I have aggregated the promotion data to week whereby if a

[Matplotlib-users] usetex=True

2008-01-15 Thread Paul Novak
Hello, I am trying to use the PS backend to make some simple line plots, using the following script, but I get the error messages included below when I try to plot with usetex=True. I have also included the output from --verbose=helpful. I am using the current SVN, and I don't recall having

Re: [Matplotlib-users] usetex=True

2008-01-15 Thread Michael Droettboom
It's a bug. It's now possible for rgba colors to make their way all the way down to that level, so the code needs to truncate that to rgb (Ps can't handle alpha anyway). This is committed in SVN r4869. Cheers, Mike Paul Novak wrote: Hello, I am trying to use the PS backend to make some

Re: [Matplotlib-users] usetex=True

2008-01-15 Thread Paul Novak
I have another problem after updating to SVN r4869. The ticks take the color of the plotted line without regard to the default. For example, matplotlib.rc('xtick', color='black') matplotlib.rc('ytick', color='black') plot(x, y, 'red') will give red ticks. Paul Michael Droettboom wrote: It's

Re: [Matplotlib-users] usetex=True

2008-01-15 Thread Michael Droettboom
Thanks for pointing that out -- I didn't even notice. There was an ordering problem in how colors were being set. This should be fixed in r4870. Cheers, Mike Paul Novak wrote: I have another problem after updating to SVN r4869. The ticks take the color of the plotted line without regard to

Re: [Matplotlib-users] usetex=True

2008-01-15 Thread Michael Droettboom
[I'm bringing this back to the list. Hope you don't mind.] I've been doing a lot of non-matplotlib work lately and this fell off my radar. Thanks for the reminder. The patch looks good to me. I'm not concerned about doing all this in _get_handles as opposed to Legend.__init__. I actually

Re: [Matplotlib-users] usetex=True

2008-01-15 Thread Paul Novak
The patch for legends works except for LineCollection. For any call to legend(), I get the errors below, Paul Traceback (most recent call last): File /usr/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py, line 331, in expose_event self._render_figure(self._pixmap, w, h)

[Matplotlib-users] Bug in pylab?

2008-01-15 Thread Lorenzo Isella
Dear All, I am sending this email out of frustration, but I hope that someone will be able to tell me what is going on. I am using pylab on a Debian testing box. I have the feeling that there is some problem with pylab when I alternate, as I am doing now, many linear and log-log plots. Very

Re: [Matplotlib-users] Bug in pylab?

2008-01-15 Thread Darren Dale
Hi Lorenzo, On Tuesday 15 January 2008 4:14:24 pm Lorenzo Isella wrote: Dear All, I am sending this email out of frustration, but I hope that someone will be able to tell me what is going on. I am using pylab on a Debian testing box. I have the feeling that there is some problem with pylab

Re: [Matplotlib-users] Bug in pylab?

2008-01-15 Thread Lorenzo Isella
Hello, The situation (at least in my case) has definitely improved (for now) after adding a clf() command at the end of every figure I generate. Somehow, it looks like pylab cannot properly forget the previous figure before drawing a new one unless you explicitly tell it. Maybe it is worth a