[Matplotlib-users] error in savefig with wxAgg backend

2008-02-29 Thread Jeff Peery
Hello, I'm trying to use savefig in my wx app and I'm using wxAgg backend. I'm getting this error: FILE .maplotlib\backends\backend_bases.py, line 397 in print_png Self.get_renderer()._renderer.write_png(filename, self.figure.dpi.dpi.get()) TypeError: cannot return std::string from Unicode o

Re: [Matplotlib-users] Plotting in C++

2008-02-29 Thread Christopher Barker
This is getting OT, but I'd kind of like to see it get archived somewhere... João Luís Silva wrote: > I'm trying to explore new options, and learn new skills. My favorite > programming languages are C/C++ and Python. I use Python for small > scripts and applications, and C/C++ for everything els

Re: [Matplotlib-users] Plotting in C++

2008-02-29 Thread Matthieu Brucher
> > I'm trying to explore new options, and learn new skills. My favorite > programming languages are C/C++ and Python. I use Python for small > scripts and applications, and C/C++ for everything else. I've started a > smallish/medium size open source app in python+pygtk+matplotlib+numpy > (laserfoa

Re: [Matplotlib-users] Plotting in C++

2008-02-29 Thread João Luís Silva
Christopher Barker wrote: > João Luis Silva wrote: >>So do you know any free open source library for plotting, that can be >> embedded in a GUI (such as wxWidgets or GTK), and usable from C/C++? > > If you're not committed to a particular GUI, check out QT -- I think > there are some plotting

Re: [Matplotlib-users] Installing 0.91.2 on OS X 10.5 Leopard

2008-02-29 Thread Christopher Barker
Samuel M. Smith wrote: > I finally bit the bullet and decided to upgrade to Leopard. > The MatPlotLib 0.91.2 egg fails to install. > > > Configuration: > MacBook Pro > OS X 10.5.2 > > Python 2.5.2 from http://www.pythonmac.org/packages/py25-fat/dmg/ > python-2.5-macosx.d

Re: [Matplotlib-users] Plotting in C++

2008-02-29 Thread Christopher Barker
João Luis Silva wrote: >So do you know any free open source library for plotting, that can be > embedded in a GUI (such as wxWidgets or GTK), and usable from C/C++? If you're not committed to a particular GUI, check out QT -- I think there are some plotting tools for QT out there: http://qwt

Re: [Matplotlib-users] preventing extra whitespace around figure

2008-02-29 Thread David Huard
Have you tried pdfcrop ? It computes margin automatically, you could then transfer the file back to eps. David PDFCROP 1.5, 2004/06/24 - Copyright (c) 2002, 2004 by Heiko Oberdiek. Syntax: pdfcrop [options] [output file] Function: Margins are calculated and removed for each page in the file. O

[Matplotlib-users] Installing 0.91.2 on OS X 10.5 Leopard (corrected)

2008-02-29 Thread Samuel M. Smith
I finally bit the bullet and decided to upgrade to Leopard. The MatPlotLib 0.91.2 egg fails to install. Configuration: MacBook Pro OS X 10.5.2 Python 2.5.2 from http://www.python.org/ftp/python/2.5.2/ python-2.5.2-macosx.dmg NumPy 1.04 from http://www.py

[Matplotlib-users] Error WX_Agg backend with0.91.1 on OS X 10.5 Leopard

2008-02-29 Thread Samuel M. Smith
Installed MatPlotLib 0.91.1 on OS X 10.5 Leopard (intel) When saving plot files to formats .png or .svg I get the following error. Matplotlib backend_wx_error cannot return std::string from Unicode object This errors occurs with both wxpython 2.8.30 and 2.8.7.1 .ps .eps and .pdf works fine.

[Matplotlib-users] Installing 0.91.2 on OS X 10.5 Leopard

2008-02-29 Thread Samuel M. Smith
I finally bit the bullet and decided to upgrade to Leopard. The MatPlotLib 0.91.2 egg fails to install. Configuration: MacBook Pro OS X 10.5.2 Python 2.5.2 from http://www.pythonmac.org/packages/py25-fat/dmg/ python-2.5-macosx.dmg NumPy 1.04 from http://w

Re: [Matplotlib-users] Matplotlib performance

2008-02-29 Thread John Hunter
On Fri, Feb 29, 2008 at 10:21 AM, Onno Broekmans <[EMAIL PROTECTED]> wrote: > Thanks for your reply! I agree that under normal circumstances, > downsampling would be a good thing to do. However, in this case, it's > really about the tiny details in the trace, so I'd like to zoom in on > a smal

Re: [Matplotlib-users] Changing ticks format

2008-02-29 Thread Matthieu Brucher
> > You might try checking what the existing values are: > > >>> rcParams['axes.formatter.limits'] > [-7, 7] > > and try: > > rcParams['axes.formatter.limits']=[-4,4] > Sorry, I didn't check the current values :| It works like a charm now, thanks for all the helpfull answers :) Matthieu -- Frenc

Re: [Matplotlib-users] Changing ticks format

2008-02-29 Thread Darren Dale
On Friday 29 February 2008 11:15:20 am Matthieu Brucher wrote: > > You can either set your axes.formatter.limits rc setting to something > > like 4, > > or you can make your axes smaller in the figure, like > > axes([0.25,0.125,0.7,0.85]) > > Thanks for this. I tried the first one (I can't make the

Re: [Matplotlib-users] Matplotlib performance

2008-02-29 Thread Onno Broekmans
Hi Alan, >> I'm trying to plot a current trace from a physics >> experiment, containing about 300,000 data points. AGI> You may find this off topic, since you seem to mean by "plot AGI> a current trace" something different than I'm familiar with. AGI> [snip] AGI> So perhaps your question is real

Re: [Matplotlib-users] Plotting in C++

2008-02-29 Thread John Hunter
On Fri, Feb 29, 2008 at 9:40 AM, João Luis Silva <[EMAIL PROTECTED]> wrote: >So do you know any free open source library for plotting, that can be > embedded in a GUI (such as wxWidgets or GTK), and usable from C/C++? > Matplotlib may well be a killer application for me in the sense that it

Re: [Matplotlib-users] Changing ticks format

2008-02-29 Thread Matthieu Brucher
> > You can either set your axes.formatter.limits rc setting to something like > 4, > or you can make your axes smaller in the figure, like > axes([0.25,0.125,0.7,0.85]) > Thanks for this. I tried the first one (I can't make the figure smaller ;)), but I got this result : File "images.py", line

Re: [Matplotlib-users] Changing ticks format

2008-02-29 Thread Darren Dale
On Friday 29 February 2008 10:38:33 am Matthieu Brucher wrote: > > Anyway, it is almost surely a bounding box problem. > > > > > I think you can use eps2eps to get a new bounding box. > > > > Thanks, I'll try this :) > > It doesn't change a thing :| > > Besides, even if it worked, there should be a

[Matplotlib-users] Plotting in C++

2008-02-29 Thread João Luis Silva
Hello all, I'm starting a new application, and I want to do it in C++. Previously, I've coded similar things in Python and pygtk, using matplotlib for the graphics. Now I want to create an application in C++ with a GUI that needs to display simple plots and hidden surface 3D plots and that runs on

Re: [Matplotlib-users] Changing ticks format

2008-02-29 Thread Matthieu Brucher
> > > Anyway, it is almost surely a bounding box problem. > > I think you can use eps2eps to get a new bounding box. > > > Thanks, I'll try this :) It doesn't change a thing :| Besides, even if it worked, there should be a way of changing the global scale (see the attached image for a example).

Re: [Matplotlib-users] preventing extra whitespace around figure

2008-02-29 Thread Alan G Isaac
On Fri, 29 Feb 2008, Michael Hearne apparently wrote: > I gave this a shot, and eps2eps seems not to have any effect on the > bounding box. I've done some experiments where I reduce the bounding > box by hand, which works really well - the only problem is I need a > way to determine where the e

Re: [Matplotlib-users] Matplotlib performance

2008-02-29 Thread John Hunter
On Fri, Feb 29, 2008 at 8:27 AM, <[EMAIL PROTECTED]> wrote: > Hi everyone, > > Quite recently I started out with learning Python, IPython, SciPy and > Matplotlib, to try see if I could replace some data analysis software > that was previously written in LabVIEW. Slowly I'm getting sort-of the >

Re: [Matplotlib-users] preventing extra whitespace around figure

2008-02-29 Thread Michael Hearne
I gave this a shot, and eps2eps seems not to have any effect on the bounding box. I've done some experiments where I reduce the bounding box by hand, which works really well - the only problem is I need a way to determine where the edge of my plot really is. In Basemap, there is a box draw

Re: [Matplotlib-users] Matplotlib performance

2008-02-29 Thread Alan G Isaac
On Fri, 29 Feb 2008, [EMAIL PROTECTED] apparently wrote: > I'm trying to plot a current trace from a physics > experiment, containing about 300,000 data points. You may find this off topic, since you seem to mean by "plot a current trace" something different than I'm familiar with. Suppose I h

[Matplotlib-users] Matplotlib performance

2008-02-29 Thread matplotlibuser
Hi everyone, Quite recently I started out with learning Python, IPython, SciPy and Matplotlib, to try see if I could replace some data analysis software that was previously written in LabVIEW. Slowly I'm getting sort-of the hang of it, but I've run into a few problems, and I'm now looking around f

Re: [Matplotlib-users] locale and Qt

2008-02-29 Thread Stephane Raynaud
On Fri, Feb 29, 2008 at 2:52 PM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > Can you describe how you are changing the locale? It could be that Qt > is reverting it to your system value every time a new figure window is > created. Maybe you could set it somehow "deeper", like in an > envir

Re: [Matplotlib-users] Changing ticks format

2008-02-29 Thread Matthieu Brucher
2008/2/29, Alan G Isaac <[EMAIL PROTECTED]>: > > On Fri, 29 Feb 2008, Matthieu Brucher apparently wrote: > > Sorry to raise this issue again, but some has a clue ? > > > Didn't see this earlier and you did not attach the picture > this time, Ooops... but I've seen cut-off labels in some settin

Re: [Matplotlib-users] bug with wx toolbar

2008-02-29 Thread Michael Droettboom
Seems like a reasonable fix to me. I don't think the "classic" toolbars get as much testing as the new ones, which is probably how this fell through the cracks. I have committed this in SVN r4991. Cheers, Mike Jeff Peery wrote: > Hello, > I just upgraded to the most recent version of matplotl

Re: [Matplotlib-users] Show shapes on scatterplot legend?

2008-02-29 Thread Michael Droettboom
I don't believe there is at present. There was a recent discussion about this on the list, and it's on the radar as something to add for a future release. Cheers, Mike chombee wrote: > I'm making some scatter plots which will probably end up getting printed > in black and white. I'm actually d

Re: [Matplotlib-users] problem with modules

2008-02-29 Thread Michael Droettboom
Davide Cellai wrote: > That answers my questions. > > Thank you very much, > > Davide > > On Thu, Feb 28, 2008 at 8:08 PM, Steve Schmerler <[EMAIL PROTECTED] > > wrote: > > On Thu, Feb 28, 2008 at 05:40:00PM +, Davide Cellai wrote: > > 1. To begin with, I

Re: [Matplotlib-users] locale and Qt

2008-02-29 Thread Michael Droettboom
Can you describe how you are changing the locale? It could be that Qt is reverting it to your system value every time a new figure window is created. Maybe you could set it somehow "deeper", like in an environment variable. Cheers, Mike Stephane Raynaud wrote: > Hi, > > when I set the local

Re: [Matplotlib-users] Changing ticks format

2008-02-29 Thread Alan G Isaac
On Fri, 29 Feb 2008, Matthieu Brucher apparently wrote: > Sorry to raise this issue again, but some has a clue ? Didn't see this earlier and you did not attach the picture this time, but I've seen cut-off labels in some settings when there are negative coordinates in the EPS bounding box. (No

Re: [Matplotlib-users] Changing ticks format

2008-02-29 Thread Matthieu Brucher
Hi, Sorry to raise this issue again, but some has a clue ? Matthieu 2008/2/4, Matthieu Brucher <[EMAIL PROTECTED]>: > > Hi, > > I'm trying to change the y labels on the attached picture > (cout_it_459_zoom.eps). I modified the labels explicitly, but they still are > outside the picture :( > Is i

Re: [Matplotlib-users] how to change the aspect ratio of a plot

2008-02-29 Thread Forrest Sheng Bao
Well, I want a way that I can use some function or an option/parameter of a function to do that. The code I am using to plot is like this: x = range(0,len(data)); lines = plot(x, data); setp(lines, linewidth=0.5) axis('tight') grid(True); xlabel('sampling points'); ylabel('quantilized steps'); ti

Re: [Matplotlib-users] how to change the aspect ratio of a plot

2008-02-29 Thread Alan G Isaac
On Fri, 29 Feb 2008, Forrest Sheng Bao apparently wrote: > I wanna know how to change the aspect of my > plot in my program. Call set_aspect on a axes instance; then call apply_aspect. hth, Alan Isaac - This SF.net ema

Re: [Matplotlib-users] preventing extra whitespace around figure

2008-02-29 Thread Alan G Isaac
I think I recall that eps2eps can reset your bounding box, if that's the problem. http://www.linuxcommand.org/man_pages/eps2eps1.html Cheers, Alan Isaac - This SF.net email is sponsored by: Microsoft Defy all challenges. M

Re: [Matplotlib-users] problem with modules

2008-02-29 Thread Davide Cellai
That answers my questions. Thank you very much, Davide On Thu, Feb 28, 2008 at 8:08 PM, Steve Schmerler <[EMAIL PROTECTED]> wrote: > On Thu, Feb 28, 2008 at 05:40:00PM +, Davide Cellai wrote: > > 1. To begin with, I've copied the lines: > > > > deb http://anakonda.altervista.org/debian pack

[Matplotlib-users] how to change the aspect ratio of a plot

2008-02-29 Thread Forrest Sheng Bao
Hi guys, I am quite new to matplotlib. I wanna know how to change the aspect of my plot in my program. I don't wanna change it by toolbar coz there are thousands of data that I can't change them one by one by myself. Thanks, Forrest -- Forrest Sheng Bao Ph.D. student, Dept. of Computer Science