Re: [Matplotlib-users] Reducing png file size

2009-05-17 Thread Jouni K . Seppänen
Jesper Larsen writes: > Unfortunately the files are quite big (up to ~300 kb). I have however > tried using the Linux tool pngnq to reduce the file size with a factor > ~3-4 with almost no degradation of the result. > Pixel depth (Pixel Depth): 32 > Colour Type (Photometric Interpretation):

Re: [Matplotlib-users] subplot

2009-05-17 Thread Jae-Joon Lee
On Sun, May 17, 2009 at 5:03 PM, Alan G Isaac wrote: > So I am suggesting that any new functions > certainly should not propagate this anomaly. Understood. And, yes, I guess you're quite right in this regard. And I'll try to deprecate the current matlab-like interface in future (at least in my ax

Re: [Matplotlib-users] Question about imshow

2009-05-17 Thread Jae-Joon Lee
> > I think the point here is that > >        img = Image('foo.png') >        imshow(img) > > and > >        img = Image('foo.png') >        imshow(asarray(img)) > > give different results, since matplotlib.image.pil_to_array functions > differently from what PIL exposes in __array_interface__ > >

Re: [Matplotlib-users] subplot

2009-05-17 Thread Jae-Joon Lee
Hi all, I had a few off-list conversation with Alan, and I'm also quite agree with him for this issue. Just to rephrase, I think the current subplot interface has (at least) two issues. issue 1) the indexing convention is not that of python. The index starts from 1, instead of 0. (eg "111") i

[Matplotlib-users] Reducing png file size

2009-05-17 Thread Jesper Larsen
Hi mpl-users, I have a web application in which I produce png files using matplotlib. Unfortunately the files are quite big (up to ~300 kb). I have however tried using the Linux tool pngnq to reduce the file size with a factor ~3-4 with almost no degradation of the result. I therefore wondered whe

Re: [Matplotlib-users] subplot

2009-05-17 Thread Alan G Isaac
On 5/17/2009 2:44 PM Jae-Joon Lee apparently wrote: > I meant consistency with Matplotlib itself. My point is that that is not well defined, since most of the OO API in Matplotlib is Python centric, but the subplot definition is an exception. So I am suggesting that any new functions certainly sh

Re: [Matplotlib-users] A request for code critique

2009-05-17 Thread Gökhan SEVER
Hmm, Is it working on your side from a bash shell as "ipython --pylab script argument" I couldn't make it work in this fashion. As I said whos list nothing :( I am on Fedora 10 x86, Python 2.5.2, IPython 0.10.bzr.r1173 Without the pylab switch I see the interactive space with variables. I also

Re: [Matplotlib-users] A request for code critique

2009-05-17 Thread Roy Hyunjin Han
On Sun, May 17, 2009 at 2:17 PM, Gökhan SEVER wrote: > Hello Roy, > > "ipython splot.py 09_03_23_11_44_54.stats.tas" > > works, but I can't make it work with pylab switch. It executes my script, > however whos list an empty namespace :( Gökhan, The "whos" command works for me. Also, why can't y

Re: [Matplotlib-users] subplot

2009-05-17 Thread Jae-Joon Lee
> Oops, sorry about that.  Looks like I have it fixed now. > > JDH > Yes, it looks fine now. Thanks! -JJ -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables

Re: [Matplotlib-users] polar plot: problem with negative angles

2009-05-17 Thread Magnus Benjes
> Magnus Benjes wrote: >> Hello, >> in version 0.98.5.2 the polar plot still has a problem with negativ >> angles. >> The polarplot is drawing a circle when the angle changes from negativ to >> positiv (e.g. from -0.01 to +0.01). > > Your example works fine with svn. I don't recall whether the p

Re: [Matplotlib-users] A request for code critique

2009-05-17 Thread Gökhan SEVER
Hello Roy, "ipython splot.py 09_03_23_11_44_54.stats.tas" works, but I can't make it work with pylab switch. It executes my script, however whos list an empty namespace :( My aim of loading the variables and results into an interactive pylab enabled workspace is to be able to continue working on

Re: [Matplotlib-users] polar plot: problem with negative angles

2009-05-17 Thread Eric Firing
Magnus Benjes wrote: > Hello, > in version 0.98.5.2 the polar plot still has a problem with negativ angles. > The polarplot is drawing a circle when the angle changes from negativ to > positiv (e.g. from -0.01 to +0.01). Your example works fine with svn. I don't recall whether the problem was f

Re: [Matplotlib-users] Colormap using (UV)coordinates from file

2009-05-17 Thread Alan G Isaac
On 5/17/2009 11:11 AM Linda_swe apparently wrote: > ("total size of new array must be unchanged") Again, this means what it says. Your data array is the wrong size. You cannot for example reshape a (3,) array into a (2,2) array. http://www.scipy.org/Numpy_Example_List_With_Doc#head-11717acafb821

Re: [Matplotlib-users] Colormap using (UV)coordinates from file

2009-05-17 Thread Linda_swe
Hi Alan, Thanks and it works for y and x but i guess i dont know how to shapet Z ("total size of new array must be unchanged") Overall i just dont get it how to calcuate the nlons and nlats fro Z. yre = np.reshape(lats,nlats) xre = np.reshape(lons,nlons) print yre print xre zre = np.resh

Re: [Matplotlib-users] Colormap using (UV)coordinates from file

2009-05-17 Thread Alan G Isaac
On 5/17/2009 10:21 AM Linda_swe apparently wrote: > atlest give me a hint... The hint: > error:list object has no attribute reshape Listen to Python: all the info is there. A list is not a numpy array. Don't treat it like one. However you can do: numpy.reshape(mylist, myshape) Alan Isaac

Re: [Matplotlib-users] Colormap using (UV)coordinates from file

2009-05-17 Thread Linda_swe
Why dont anyone answer me??? atlest give me a hint... Ok, so i want to use the my csv as input and then plot the contour. I have the follwing code but gives error:list object has no attribute reshape is using list diffrent than using numpys loadtext and then into variables ??? from matplotli

Re: [Matplotlib-users] subplot

2009-05-17 Thread John Hunter
On Sat, May 16, 2009 at 10:58 PM, Jae-Joon Lee wrote: >>  http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#rgb-axes > > Thanks a lot, John. > However, example figures are missing currently. (instead it shows a > message "Exception occurred rendering plot."). > Also, AP

Re: [Matplotlib-users] Question about imshow

2009-05-17 Thread Pauli Virtanen
Sun, 17 May 2009 00:15:48 -0400, Jae-Joon Lee wrote: > On Sat, May 16, 2009 at 6:58 PM, > wrote: >> >> Hi, >> I want to read images and do some processing with them. While learning >> how to do this, i.e. opening images, displaying them, transforming them >> tu numpy arrays, etc., I came across

Re: [Matplotlib-users] A request for code critique

2009-05-17 Thread Gökhan SEVER
João, Thank you for commenting on the code. sys.argv check is a wise one. Since I was the only user of this little snippet I didn't give attention of this detail, however eventually some other people will start using the code too. I thought it is more efficient to only import functions that I use