[Matplotlib-users] Images and memory management

2009-10-01 Thread Leo Trottier
I have a friend who's having strange memory issues when opening and displaying images (using Matplotlib). Here's what he says: ### pylab seems really inefficient: Opening a few images and displaying them eats up tons of memory, and the memory doesn't get freed.

Re: [Matplotlib-users] Best way to plot a 2d histogram?

2009-10-01 Thread Matthew Neeley
Here is a snippet that might get you started: import numpy as np from matplotlib import pyplot as plt from matplotlib import cm import mpl_toolkits.mplot3d as plt3 data = np.random.random((8,8))**4 cmap = cm.RdBu fig = plt.figure() ax = plt3.Axes3D(fig) d = 0.1 w, h = data.shape for x in rang

Re: [Matplotlib-users] scaling arrows in quiver

2009-10-01 Thread Eric Firing
Christopher Barker wrote: > Eric Firing wrote: >> I have committed a change to svn trunk, so that if you change the >> above to >> >> q = plt.quiver([0],[0], [1], [1], scale_units='xy', angles='xy', scale=1) > > Eric, > > You might recall that I spent a bit of time making a "stick plot" with > q

Re: [Matplotlib-users] Best way to plot a 2d histogram?

2009-10-01 Thread Gökhan Sever
On Thu, Oct 1, 2009 at 5:29 PM, Ernest Adrogué wrote: > Hello all, > > What is the best way to plot a 2d histogram? > (Note that a 2d histogram is a histogram of a bivariate variable, > so it's got to be a 3d plot.) > > Ideally, it should look somewhat like this: > http://www.desy.de/~mraue/public

[Matplotlib-users] Best way to plot a 2d histogram?

2009-10-01 Thread Ernest Adrogué
Hello all, What is the best way to plot a 2d histogram? (Note that a 2d histogram is a histogram of a bivariate variable, so it's got to be a 3d plot.) Ideally, it should look somewhat like this: http://www.desy.de/~mraue/public/rootTutorial/v0.2/histogram02.gif For now, I have tried to do surfa

Re: [Matplotlib-users] scaling arrows in quiver

2009-10-01 Thread Christopher Barker
Eric Firing wrote: > I have committed a change to svn trunk, so that if you change the > above to > > q = plt.quiver([0],[0], [1], [1], scale_units='xy', angles='xy', scale=1) Eric, You might recall that I spent a bit of time making a "stick plot" with quiver. I go to work OK, but I couldn't do

Re: [Matplotlib-users] Customize SHADOW

2009-10-01 Thread Gewton Jhames
sorry, I forget the patch very simple.no big deal. On Thu, Oct 1, 2009 at 2:04 PM, Gewton Jhames wrote: > worked fine. > > > On Thu, Oct 1, 2009 at 1:10 PM, Michael Droettboom wrote: > >> I'm not quite clear on what changes you made. Can you provide a patch? >> >> Also -- have you tested the c

[Matplotlib-users] parsing csv files and accessing a particular column value

2009-10-01 Thread per freem
hi all, i am parsing a csv text file as follows: data = genfromtxt(filename, delimiter=delimiter, dtype=None, names=True) this returns an array. sometimes though i want to access the element that has value x in, say, the first column. i usually do this like this: nonzero(data['first_column'] ==

Re: [Matplotlib-users] Customize SHADOW

2009-10-01 Thread Gewton Jhames
worked fine. On Thu, Oct 1, 2009 at 1:10 PM, Michael Droettboom wrote: > I'm not quite clear on what changes you made. Can you provide a patch? > > Also -- have you tested the change I committed here: > > > http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/v0_99_maint/lib/matplot

[Matplotlib-users] saving images using pure matplotlib in Sage cuts off the bottom part (and produces corrupt file?)

2009-10-01 Thread jason-sage
Hi everyone, We're having a problem in Sage where if we specify the dpi of a figure, the bottom of the figure is cut off, but only the first time we save it. If we save the figure again, with the same arguments, the resulting image looks fine. I'm puzzled whether this is a Sage problem or a

Re: [Matplotlib-users] Customize SHADOW

2009-10-01 Thread Gewton Jhames
"solved". In the system with the 0.99 version, in the file axes.py, class Axes, method pie, the shadow is created: if shadow: # make sure to add a shadow after the call to # add_patch so the figure and transform props will be # set

Re: [Matplotlib-users] Customize SHADOW

2009-10-01 Thread Michael Droettboom
I'm not quite clear on what changes you made. Can you provide a patch? Also -- have you tested the change I committed here: http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/v0_99_maint/lib/matplotlib/patches.py?r1=7443&r2=7837&pathrev=7837 Cheers, Mike Gewton Jhames wrote: > "s

Re: [Matplotlib-users] Customize SHADOW

2009-10-01 Thread Michael Droettboom
Yeah, alpha handling is a bit of a mess -- it should probably be revamped in light of the fact that most places now accept rgba. We just need to decide if there is a good solution that doesn't break backward compatibility, or whether we should just break compatibility (e.g. remove set/get_alph

Re: [Matplotlib-users] trailing space in text string stripped, making it impossible to right-pad my text

2009-10-01 Thread Michael Droettboom
Christopher Barrington-Leigh wrote: >> This does not. First of all, "~" and "\mbox" are not supported if >> usetex=False and I guess never will be. On the other hand, >> as far as I can see, the whitespace stripping is not done in mpl >> side. And I have a feeling that it may be the freetype libra

Re: [Matplotlib-users] Customize SHADOW

2009-10-01 Thread Gewton Jhames
OK, yesterday I was taking a look to the patch module. then, I went home. Today, I'll continue to look at these properties of alpha. because, yes, that's what's happening. one have alpha .5 and the other, 1. Answering Mike's question: the first system (the one I've wrote the code) is ubuntu 9.04, t

[Matplotlib-users] Printing in wx : a solution ?

2009-10-01 Thread Cédrick FAURY
Hello, Printing in wx (with "printing_in_wx.py" from mpl examples) doesn't work on all pc (windows) I have tested. A crash occur as described in the thread Printing in wx The only

Re: [Matplotlib-users] Grouper use

2009-10-01 Thread TP
Michael Droettboom wrote: > You can use the twinx/twiny methods to join two axes after they've been > created. > > I don't think we currently provide a way to unjoin the subplots (either > in the axes or in the Grouper class itself.) I think that's > functionality we would need to add. If you c