Re: [Matplotlib-users] float argument required
Pau vim.u...@googlemail.com writes: I have made a plot and, when I try to save it as eps/ps, I get the error float argument required in a pop-up window, whilst the terminal shows this error message: /usr/local/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py:1054: GtkWarning: Unable to find default local directory monitor type if self.run() != int(gtk.RESPONSE_OK): It seems that you are using the GTK backend. Have you tried this with other backends, e.g. GTKAgg? If saving works with other backends, this is likely a bug in the non-Agg GTK backend. I can save it as pdf, but the quality is not what I want. The curves do not have the thickness I gave them. This could be a difference between the non-Agg GTK rendering and the rest of the backends, or it could be a bug in the PDF backend. I would be interested in seeing your script, especially if there is a difference between PDF and Agg-based backends. -- Jouni K. Seppänen http://www.iki.fi/jks -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] 3D plots
Hello list ! This is probably a recurrent topic, or even more probably HAVE been a recurrent topic... So sorry, sorry, sorry... I wanted to search the archives but Sourceforge is very slow today (...). Anyway, here is my question: Is it right that Matplotlib can no longer plot 3D graphes? The scipy Cookbook / Matplotlib / mplot3D says: The examples below show simple 3D plots using matplotlib. matplotlib's 3D capabilities were added by incorporating John Porter's mplot3d module, thus no additional download is required any more, the following examples will run with an up to date matplotlib installation. Note, this code is not supported in matplotlib-0.98 and later, so please use the 0.91 maintenance release of matplotlib if you need this functionality. Which seems a bit like saying one thing and the opposite in the next sentence... So if I understand correctly, for some obscure reason, Matplotlib has been stripped from its 3D plot capabilities... and this same website suggest the use of another package instead... Does it mean that all my efforts to understand and learn Matplotlib are just a big waste of time since I need another package now that I need 3D plot? So I ask you for advice: should I forget completely Matplotlib and move to MayaVI2? Or is there any plan to bring 3D back into Matplotlib, I mean to make a proper and complete alternative to Matlab? Or am I just upset because I am missing something. I only plot data every 4 or 6 months, and I really don't expect to see major functionalities to have disappeared when I come back to plotting data... is it a wrong expectation? Thanks !! -Etienne -- ~ Etienne Gaudrain Centre for the Neural Basis of Hearing Department of Physiology, Development and Neuroscience University of Cambridge Downing Street Cambridge CB2 3EG UK Phone: +44 (1223) 333 859 office Fax: +44 (1223) 333 840 department ~ -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] On changing the default tick pad
I tend to agree -- but worry that such a global change may have unintended consequences. I'm pretty tight on time at the moment, but one way to test this theory would be to run examples/test/backend_driver.py with the new settings. This will generate output for most of the examples. Then using an image viewing tool like gthumb or something, go through all the examples and make sure things get better in all cases, and never worse. Let us know about the worse ones to see if they have easy workarounds. If they mostly look good, I think we should consider changing the default for new non-maintenance versions going forward. Cheers, Mike Alan G Isaac wrote: On 3/21/2009 11:33 PM Gary Ruben apparently wrote: Whilst agreeing with Kaushik's sentiments on the greatness of matplotlib, I thought his example plot nicely illustrates a layout wart that I think is easily fixed by changing the default xtick.major.pad, xtick.minor.pad, ytick.major.pad and ytick.minor.pad values from 4 to 6. As well as preventing the x- and y-axis labels running into each other in Kaushik's example, the most common case of a 2D plot with 0 lower bound on both the x- and y-axes [e.g. plot(rand(10))] looks better with the default font when pad=6. Yes indeed. I would like to see examples justifying the current default. Alan Isaac (another user) -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] float argument required
Try switching to the Ps backend by putting: import matplotlib matplotlib.use(ps) at the top of your script. That will take gtk and its popup windows out of the equation. After doing that, you should get a traceback at the terminal that should help narrow this down. At this point we can only guess, without a line number. Can you also provide a minimal script that causes this error? I'm particularly puzzled by the difference in output between PDF and PS. Cheers, Mike Pau wrote: Hello, using 0.98.5.2 under OpenBSD -current I have made a plot and, when I try to save it as eps/ps, I get the error float argument required in a pop-up window, whilst the terminal shows this error message: /usr/local/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py:1054: GtkWarning: Unable to find default local directory monitor type if self.run() != int(gtk.RESPONSE_OK): I can save it as pdf, but the quality is not what I want. The curves do not have the thickness I gave them. I reproduced the same running it under Fedora 10. I have googled and yahooed. Found nothing. It looks as if the some function was expecting a decimal-point number but got something else. I can send the .py and data, if you wish. Thanks, Pau -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 3D plots
Etienne Gaudrain et.gaudr...@free.fr writes: This is probably a recurrent topic, or even more probably HAVE been a recurrent topic... So sorry, sorry, sorry... I wanted to search the archives but Sourceforge is very slow today (...). I don't think the Sourceforge search has ever been very useful. Try Gmane, Nabble, or The Mail Archive instead: http://search.gmane.org/form.php?group=gmane.comp.python.matplotlib.general http://search.gmane.org/form.php?group=gmane.comp.python.matplotlib.devel http://www.nabble.com/matplotlib-f2903.html http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/ http://www.mail-archive.com/matplotlib-de...@lists.sourceforge.net/ Is it right that Matplotlib can no longer plot 3D graphes? It is correct: the 3D capabilities have been removed from the latest versions. So if I understand correctly, for some obscure reason, Matplotlib has been stripped from its 3D plot capabilities... and this same website suggest the use of another package instead... The reason is that extensive changes were made to the way Matplotlib works internally, and no-one has been sufficiently interested in the 3D plotting code to keep it up to date. Does it mean that all my efforts to understand and learn Matplotlib are just a big waste of time since I need another package now that I need 3D plot? Of course the old version of Matplotlib still works, it just doesn't have all the latest features. Also, very recently some people have started to work on the 3D code: http://thread.gmane.org/gmane.comp.python.matplotlib.devel/6672/focus=6691 If you want to be able to make 3D plots with Matplotlib, perhaps you could find a way to help with this effort. -- Jouni K. Seppänen http://www.iki.fi/jks -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 3D plots
Hi Etienne, Sorry to hear about your disappointment. You can read about the attempt to resurrect the 3D plotting capabilities here: http://www.nabble.com/Updating-MPlot3D-to-a-more-recent-matplotlib.-td22302256.html Unfortunately, this doesn't help you right now. Depending on the type of 3D plotting you want to do, some suggestions for other packages that support 3D plotting from Python and work now are: Mayavi2's mlab interface http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/mlab_3d_plotting_functions.html gnuplot.py http://gnuplot-py.sourceforge.net/ DISLIN http://www.mps.mpg.de/dislin R via RPy http://rpy.sourceforge.net/ and I'm pretty sure there are more too. Right now, if mayavi2 looks like it'll do what you want, I'd recommend it as your next stop. And in my opinion, I wouldn't say that your time spent learning matplotlib was wasted - 2D plotting is usually useful and matplotlib may soon again have limited 3D capability. Gary R. Etienne Gaudrain wrote: Hello list ! This is probably a recurrent topic, or even more probably HAVE been a recurrent topic... So sorry, sorry, sorry... I wanted to search the archives but Sourceforge is very slow today (...). Anyway, here is my question: Is it right that Matplotlib can no longer plot 3D graphes? snip Does it mean that all my efforts to understand and learn Matplotlib are just a big waste of time since I need another package now that I need 3D plot? So I ask you for advice: should I forget completely Matplotlib and move to MayaVI2? Or is there any plan to bring 3D back into Matplotlib, I mean to make a proper and complete alternative to Matlab? Or am I just upset because I am missing something. I only plot data every 4 or 6 months, and I really don't expect to see major functionalities to have disappeared when I come back to plotting data... is it a wrong expectation? Thanks !! -Etienne -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 3D plots
Thanks a lot for the link, and for the suggestions! I will probably give a go to Mayavi2, but given how heavy it seems to be (compared to matplotlib) it probably requires some custom wrapping... which means again a lot time investment... thanks for the tips anyway! Cheers, -Etienne Gary Ruben wrote: Hi Etienne, Sorry to hear about your disappointment. You can read about the attempt to resurrect the 3D plotting capabilities here: http://www.nabble.com/Updating-MPlot3D-to-a-more-recent-matplotlib.-td22302256.html Unfortunately, this doesn't help you right now. Depending on the type of 3D plotting you want to do, some suggestions for other packages that support 3D plotting from Python and work now are: Mayavi2's mlab interface http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/mlab_3d_plotting_functions.html gnuplot.py http://gnuplot-py.sourceforge.net/ DISLIN http://www.mps.mpg.de/dislin R via RPy http://rpy.sourceforge.net/ and I'm pretty sure there are more too. Right now, if mayavi2 looks like it'll do what you want, I'd recommend it as your next stop. And in my opinion, I wouldn't say that your time spent learning matplotlib was wasted - 2D plotting is usually useful and matplotlib may soon again have limited 3D capability. Gary R. Etienne Gaudrain wrote: Hello list ! This is probably a recurrent topic, or even more probably HAVE been a recurrent topic... So sorry, sorry, sorry... I wanted to search the archives but Sourceforge is very slow today (...). Anyway, here is my question: Is it right that Matplotlib can no longer plot 3D graphes? snip Does it mean that all my efforts to understand and learn Matplotlib are just a big waste of time since I need another package now that I need 3D plot? So I ask you for advice: should I forget completely Matplotlib and move to MayaVI2? Or is there any plan to bring 3D back into Matplotlib, I mean to make a proper and complete alternative to Matlab? Or am I just upset because I am missing something. I only plot data every 4 or 6 months, and I really don't expect to see major functionalities to have disappeared when I come back to plotting data... is it a wrong expectation? Thanks !! -Etienne -- ~ Etienne Gaudrain Centre for the Neural Basis of Hearing Department of Physiology, Development and Neuroscience University of Cambridge Downing Street Cambridge CB2 3EG UK Phone: +44 (1223) 333 859 office Fax: +44 (1223) 333 840 department ~ -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 3D plots
Thanks for all these pointers! I am well aware and respectful of the open source philosophy, and please do not see a criticism toward the work of the developers in my e-mail... just a lost user seeking advice, wanting to understand what happened to catch the train I apparently missed during the last 6 months... I will sure have look to the current project and see if I can help. Thanks for this particular hint! Cheers, -Etienne Jouni K. Seppänen wrote: Etienne Gaudrain et.gaudr...@free.fr writes: This is probably a recurrent topic, or even more probably HAVE been a recurrent topic... So sorry, sorry, sorry... I wanted to search the archives but Sourceforge is very slow today (...). I don't think the Sourceforge search has ever been very useful. Try Gmane, Nabble, or The Mail Archive instead: http://search.gmane.org/form.php?group=gmane.comp.python.matplotlib.general http://search.gmane.org/form.php?group=gmane.comp.python.matplotlib.devel http://www.nabble.com/matplotlib-f2903.html http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/ http://www.mail-archive.com/matplotlib-de...@lists.sourceforge.net/ Is it right that Matplotlib can no longer plot 3D graphes? It is correct: the 3D capabilities have been removed from the latest versions. So if I understand correctly, for some obscure reason, Matplotlib has been stripped from its 3D plot capabilities... and this same website suggest the use of another package instead... The reason is that extensive changes were made to the way Matplotlib works internally, and no-one has been sufficiently interested in the 3D plotting code to keep it up to date. Does it mean that all my efforts to understand and learn Matplotlib are just a big waste of time since I need another package now that I need 3D plot? Of course the old version of Matplotlib still works, it just doesn't have all the latest features. Also, very recently some people have started to work on the 3D code: http://thread.gmane.org/gmane.comp.python.matplotlib.devel/6672/focus=6691 If you want to be able to make 3D plots with Matplotlib, perhaps you could find a way to help with this effort. -- ~ Etienne Gaudrain Centre for the Neural Basis of Hearing Department of Physiology, Development and Neuroscience University of Cambridge Downing Street Cambridge CB2 3EG UK Phone: +44 (1223) 333 859 office Fax: +44 (1223) 333 840 department ~ -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Removing the white border around graph
Hi, I have a newbie question regarding matplotlib. I want to plot a graph without the white border around it. I googled a lot but didn't find anything useful. The following code produces a graph without any ticks and it also makes the white border around the graph transparent. ## import matplotlib matplotlib.use('AGG') import matplotlib.pyplot as plt fig = plt.figure(num = None, figsize = (float(size[0])/dpi, float(size[1])/dpi)) plt.axes(axisbg=white, frameon = True) fig.set_frameon(False) #Set axes and disable ticks plt.ylim(miny, maxy) plt.xlim(0,length) plt.yticks([]) plt.xticks([]) ... plt.savefig(outfile, dpi = dpi, transparent = transparent) ## I would like to know how to make the frame around the graph disappear completely so that the resulting image contains the graph in full size. Hmm...i am also curious if it is possible to display the tick markers inside the graph. Best regards and thanks for your help, Lion -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 3D plots
On Mon, Mar 23, 2009 at 6:11 AM, Etienne Gaudrain et.gaudr...@free.fr wrote: Thanks a lot for the link, and for the suggestions! I will probably give a go to Mayavi2, but given how heavy it seems to be (compared to matplotlib) it probably requires some custom wrapping... which means again a lot time investment... thanks for the tips anyway! Etienne, I believe that Mayavi2 has a matlab-like interface (called mlab, I think) which offers a much higher-level (and more command-line friendly) API. I'm not a Mayavi expert by any streach, but you may be able to find many helpful folks on the enthought-dev list (https://mail.enthought.com/mailman/listinfo/enthought-dev) cheers, Barry Cheers, -Etienne Gary Ruben wrote: Hi Etienne, Sorry to hear about your disappointment. You can read about the attempt to resurrect the 3D plotting capabilities here: http://www.nabble.com/Updating-MPlot3D-to-a-more-recent-matplotlib.-td22302256.html Unfortunately, this doesn't help you right now. Depending on the type of 3D plotting you want to do, some suggestions for other packages that support 3D plotting from Python and work now are: Mayavi2's mlab interface http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/mlab_3d_plotting_functions.html gnuplot.py http://gnuplot-py.sourceforge.net/ DISLIN http://www.mps.mpg.de/dislin R via RPy http://rpy.sourceforge.net/ and I'm pretty sure there are more too. Right now, if mayavi2 looks like it'll do what you want, I'd recommend it as your next stop. And in my opinion, I wouldn't say that your time spent learning matplotlib was wasted - 2D plotting is usually useful and matplotlib may soon again have limited 3D capability. Gary R. Etienne Gaudrain wrote: Hello list ! This is probably a recurrent topic, or even more probably HAVE been a recurrent topic... So sorry, sorry, sorry... I wanted to search the archives but Sourceforge is very slow today (...). Anyway, here is my question: Is it right that Matplotlib can no longer plot 3D graphes? snip Does it mean that all my efforts to understand and learn Matplotlib are just a big waste of time since I need another package now that I need 3D plot? So I ask you for advice: should I forget completely Matplotlib and move to MayaVI2? Or is there any plan to bring 3D back into Matplotlib, I mean to make a proper and complete alternative to Matlab? Or am I just upset because I am missing something. I only plot data every 4 or 6 months, and I really don't expect to see major functionalities to have disappeared when I come back to plotting data... is it a wrong expectation? Thanks !! -Etienne -- ~ Etienne Gaudrain Centre for the Neural Basis of Hearing Department of Physiology, Development and Neuroscience University of Cambridge Downing Street Cambridge CB2 3EG UK Phone: +44 (1223) 333 859 office Fax: +44 (1223) 333 840 department ~ -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 3D plots
Barry Wark wrote: On Mon, Mar 23, 2009 at 6:11 AM, Etienne Gaudrain et.gaudr...@free.fr wrote: Thanks a lot for the link, and for the suggestions! I will probably give a go to Mayavi2, but given how heavy it seems to be (compared to matplotlib) it probably requires some custom wrapping... which means again a lot time investment... thanks for the tips anyway! Etienne, I believe that Mayavi2 has a matlab-like interface (called mlab, I think) which offers a much higher-level (and more command-line friendly) API. I'm not a Mayavi expert by any streach, but you may be able to find many helpful folks on the enthought-dev list (https://mail.enthought.com/mailman/listinfo/enthought-dev) You might also be interested in Nicholas Rougier's SciGL project, which (IIRC) was started because of the removal of mpl's 3D plotting functionality, but which looks really nice: http://www.loria.fr/~rougier/scigl/ Reminds me that I need to find something to plot in 3D so I can use it ;) Andy -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 3D plots
Thanks Barry. I still don't know whether I want to use Gnuplot.py or Mayavi. Gnuplot is built on a very stable base, so I would be sure to have few surprises with future developments. But maybe it is too old and will not pass the Python3k step... I gave a look to Mayavi, and the start is pretty bad given that the online doc does not match the version of my Ubuntu. The consequence is that the mlab.show() method seems to be missing, while the doc present it as the solution for external scripting... but I'll dig a bit further. -Etienne Barry Wark wrote: On Mon, Mar 23, 2009 at 6:11 AM, Etienne Gaudrain et.gaudr...@free.fr wrote: Thanks a lot for the link, and for the suggestions! I will probably give a go to Mayavi2, but given how heavy it seems to be (compared to matplotlib) it probably requires some custom wrapping... which means again a lot time investment... thanks for the tips anyway! Etienne, I believe that Mayavi2 has a matlab-like interface (called mlab, I think) which offers a much higher-level (and more command-line friendly) API. I'm not a Mayavi expert by any streach, but you may be able to find many helpful folks on the enthought-dev list (https://mail.enthought.com/mailman/listinfo/enthought-dev) cheers, Barry Cheers, -Etienne Gary Ruben wrote: Hi Etienne, Sorry to hear about your disappointment. You can read about the attempt to resurrect the 3D plotting capabilities here: http://www.nabble.com/Updating-MPlot3D-to-a-more-recent-matplotlib.-td22302256.html Unfortunately, this doesn't help you right now. Depending on the type of 3D plotting you want to do, some suggestions for other packages that support 3D plotting from Python and work now are: Mayavi2's mlab interface http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/mlab_3d_plotting_functions.html gnuplot.py http://gnuplot-py.sourceforge.net/ DISLIN http://www.mps.mpg.de/dislin R via RPy http://rpy.sourceforge.net/ and I'm pretty sure there are more too. Right now, if mayavi2 looks like it'll do what you want, I'd recommend it as your next stop. And in my opinion, I wouldn't say that your time spent learning matplotlib was wasted - 2D plotting is usually useful and matplotlib may soon again have limited 3D capability. Gary R. Etienne Gaudrain wrote: Hello list ! This is probably a recurrent topic, or even more probably HAVE been a recurrent topic... So sorry, sorry, sorry... I wanted to search the archives but Sourceforge is very slow today (...). Anyway, here is my question: Is it right that Matplotlib can no longer plot 3D graphes? snip Does it mean that all my efforts to understand and learn Matplotlib are just a big waste of time since I need another package now that I need 3D plot? So I ask you for advice: should I forget completely Matplotlib and move to MayaVI2? Or is there any plan to bring 3D back into Matplotlib, I mean to make a proper and complete alternative to Matlab? Or am I just upset because I am missing something. I only plot data every 4 or 6 months, and I really don't expect to see major functionalities to have disappeared when I come back to plotting data... is it a wrong expectation? Thanks !! -Etienne -- ~ Etienne Gaudrain Centre for the Neural Basis of Hearing Department of Physiology, Development and Neuroscience University of Cambridge Downing Street Cambridge CB2 3EG UK Phone: +44 (1223) 333 859 office Fax: +44 (1223) 333 840 department ~ -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- ~ Etienne Gaudrain Centre for the Neural Basis of Hearing Department of Physiology, Development and Neuroscience University of Cambridge Downing Street Cambridge CB2 3EG UK Phone: +44 (1223) 333 859 office Fax: +44 (1223) 333 840 department ~ -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download
Re: [Matplotlib-users] 3D plots
Waouuuh ! These screenshots look awsome ! A shame this package is not in my Ubuntu repository. I'm a bit lazy, and I want a long-term solution, which supposes auto-update... -Etienne Andy Buckley wrote: You might also be interested in Nicholas Rougier's SciGL project, which (IIRC) was started because of the removal of mpl's 3D plotting functionality, but which looks really nice: http://www.loria.fr/~rougier/scigl/ Reminds me that I need to find something to plot in 3D so I can use it ;) Andy -- ~ Etienne Gaudrain Centre for the Neural Basis of Hearing Department of Physiology, Development and Neuroscience University of Cambridge Downing Street Cambridge CB2 3EG UK Phone: +44 (1223) 333 859 office Fax: +44 (1223) 333 840 department ~ -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 3D plots
Ok, I'll go for Mayavi. I am reasonably impressed by the demos. I haven't been to far into the documentation and I hop I won't regret my choice. But it looks great so far. Thanks for your help !! -Etienne Etienne Gaudrain wrote: Hello list ! This is probably a recurrent topic, or even more probably HAVE been a recurrent topic... So sorry, sorry, sorry... I wanted to search the archives but Sourceforge is very slow today (...). Anyway, here is my question: Is it right that Matplotlib can no longer plot 3D graphes? The scipy Cookbook / Matplotlib / mplot3D says: The examples below show simple 3D plots using matplotlib. matplotlib's 3D capabilities were added by incorporating John Porter's mplot3d module, thus no additional download is required any more, the following examples will run with an up to date matplotlib installation. Note, this code is not supported in matplotlib-0.98 and later, so please use the 0.91 maintenance release of matplotlib if you need this functionality. Which seems a bit like saying one thing and the opposite in the next sentence... So if I understand correctly, for some obscure reason, Matplotlib has been stripped from its 3D plot capabilities... and this same website suggest the use of another package instead... Does it mean that all my efforts to understand and learn Matplotlib are just a big waste of time since I need another package now that I need 3D plot? So I ask you for advice: should I forget completely Matplotlib and move to MayaVI2? Or is there any plan to bring 3D back into Matplotlib, I mean to make a proper and complete alternative to Matlab? Or am I just upset because I am missing something. I only plot data every 4 or 6 months, and I really don't expect to see major functionalities to have disappeared when I come back to plotting data... is it a wrong expectation? Thanks !! -Etienne -- ~ Etienne Gaudrain Centre for the Neural Basis of Hearing Department of Physiology, Development and Neuroscience University of Cambridge Downing Street Cambridge CB2 3EG UK Phone: +44 (1223) 333 859 office Fax: +44 (1223) 333 840 department ~ -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How to get the coordinates (picker)
Hi Xavier, XG I'm trying to write a pyqt4 application including pylab plotting XG capabilities. XG Up to now, it looks like this (see in attachment). XG XG The picker works fine (I get the msg) *but* I also would like to get XG the (x,y) coordinates and the the corresponding value A[x,y]. XG Could someone tell me what I should do in on_pick with this event XG to get these data?? XG XG Xavier This works for me: def on_pick(self, event): tt = event.artist.get_axes() mouseevent = event.mouseevent msg = X is: + str(mouseevent.xdata) + \nY is: + str(mouseevent.ydata) QMessageBox.information(self, Click!, msg) I got some good tips on how to do this from examples/event_handling/pick_event_demo.py -- Christopher Brown, Ph.D. Department of Speech and Hearing Science Arizona State University -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 3D plots
http://gael-varoquaux.info/physics/slides_Scipy2007.pdf for a good intro to the high level mayavi API. Johann Etienne Gaudrain wrote: Ok, I'll go for Mayavi. I am reasonably impressed by the demos. I haven't been to far into the documentation and I hop I won't regret my choice. But it looks great so far. Thanks for your help !! -Etienne Etienne Gaudrain wrote: Hello list ! This is probably a recurrent topic, or even more probably HAVE been a recurrent topic... So sorry, sorry, sorry... I wanted to search the archives but Sourceforge is very slow today (...). Anyway, here is my question: Is it right that Matplotlib can no longer plot 3D graphes? The scipy Cookbook / Matplotlib / mplot3D says: The examples below show simple 3D plots using matplotlib. matplotlib's 3D capabilities were added by incorporating John Porter's mplot3d module, thus no additional download is required any more, the following examples will run with an up to date matplotlib installation. Note, this code is not supported in matplotlib-0.98 and later, so please use the 0.91 maintenance release of matplotlib if you need this functionality. Which seems a bit like saying one thing and the opposite in the next sentence... So if I understand correctly, for some obscure reason, Matplotlib has been stripped from its 3D plot capabilities... and this same website suggest the use of another package instead... Does it mean that all my efforts to understand and learn Matplotlib are just a big waste of time since I need another package now that I need 3D plot? So I ask you for advice: should I forget completely Matplotlib and move to MayaVI2? Or is there any plan to bring 3D back into Matplotlib, I mean to make a proper and complete alternative to Matlab? Or am I just upset because I am missing something. I only plot data every 4 or 6 months, and I really don't expect to see major functionalities to have disappeared when I come back to plotting data... is it a wrong expectation? Thanks !! -Etienne -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] gnuplot.py use: does no t recognize 'aqua' Term.
I have a question about gnuplot. This may not be the place to ask this, but I don't know where else (yes, I googled for a Python forum on gnuplot, but didn't see any -- could have missed it) Several people have recommended gnuplot (and gnuplot.py) in this email list for 3D plotting (now missing in matplotlib). So I tried it and I get the following errors when I run the demo.py: [myterm] : python demo.py gnuplot set terminal aqua gnuplot set title A simple example gnuplot set data style linespoints gnuplot set terminal aqua ^ line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list I installed AquaTerm after getting this message (and doing some googling) and reinstalled gnuplot.py, but I still get the message. Any clues are welcome. Thank you. -- Lou Pecora, my views are my own. -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Matplotlib and contour graphs and pyqt
For the past few days I have been trying to get contour graphs working in my pyqt files. I am lost at trying to implement the actual plot. How is it that I can do this, so far I can only get axes to show in the window. http://code.google.com/p/scc08/source/browse/#svn/branch/realistic2d is where my project is, NOTE: most of the files are for generating data for the graphs. -- View this message in context: http://www.nabble.com/Matplotlib-and-contour-graphs-and-pyqt-tp22643299p22643299.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Animate contour plot and color bar
For my program I have been trying to animate a contour plot, the color bar, and a subtitle saying what time step it is. I have gotten the graph to write over itself but cannot get it clear the screen properly. Currently using the clf function the wipe is visible messing with animation. Here is a link to my project, the graph code is all in gui.py the rest of the files are for the generation of the data. http://code.google.com/p/scc08/source/browse/#svn/branch/realistic2d -- View this message in context: http://www.nabble.com/Animate-contour-plot-and-color-bar-tp22671942p22671942.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Animate contour plot and color bar
Deltarodigy wrote: For my program I have been trying to animate a contour plot, the color bar, and a subtitle saying what time step it is. I have gotten the graph to write over itself but cannot get it clear the screen properly. Currently using the clf function the wipe is visible messing with animation. This is because all pylab/pyplot functions include a draw_if_interactive. They are intended for interactive use, not for programmed animation. For that you should use the OO interface. Have you worked through the animation examples? http://matplotlib.sourceforge.net/examples/index.html Mpl is not particularly fast, and some operations like contouring are inherently slow, so unless the fields you are contouring are quite simple you may run into performance problems. For animation of contours, you normally want to have contours at fixed intervals, so I expect you will want to specify those contour levels as an argument to the contour and contourf functions (or Axes methods, when you switch to an OO style.) That will allow drawing the colorbar only once. Eric Here is a link to my project, the graph code is all in gui.py the rest of the files are for the generation of the data. http://code.google.com/p/scc08/source/browse/#svn/branch/realistic2d -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Animate contour plot and color bar
efiring wrote: Deltarodigy wrote: For my program I have been trying to animate a contour plot, the color bar, and a subtitle saying what time step it is. I have gotten the graph to write over itself but cannot get it clear the screen properly. Currently using the clf function the wipe is visible messing with animation. This is because all pylab/pyplot functions include a draw_if_interactive. They are intended for interactive use, not for programmed animation. For that you should use the OO interface. Have you worked through the animation examples? http://matplotlib.sourceforge.net/examples/index.html Mpl is not particularly fast, and some operations like contouring are inherently slow, so unless the fields you are contouring are quite simple you may run into performance problems. For animation of contours, you normally want to have contours at fixed intervals, so I expect you will want to specify those contour levels as an argument to the contour and contourf functions (or Axes methods, when you switch to an OO style.) That will allow drawing the colorbar only once. Eric Here is a link to my project, the graph code is all in gui.py the rest of the files are for the generation of the data. http://code.google.com/p/scc08/source/browse/#svn/branch/realistic2d -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users I have gotten that far the calculations take so long the rendering speed is not too important. I have been working on this and I got the subtitle to animate. My current problem involves the colorbar. When I update the contour graph and the titles the written over cleanly, but when the colorbar is redrawn it draws a second one right next to it. Reading other threads I tried the clf command but the makes the animation kludgy and it has to reshrink all of the graphs and such. -- View this message in context: http://www.nabble.com/Animate-contour-plot-and-color-bar-tp22671942p22672958.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Animate contour plot and color bar
Deltarodigy wrote: efiring wrote: Deltarodigy wrote: For my program I have been trying to animate a contour plot, the color bar, and a subtitle saying what time step it is. I have gotten the graph to write over itself but cannot get it clear the screen properly. Currently using the clf function the wipe is visible messing with animation. This is because all pylab/pyplot functions include a draw_if_interactive. They are intended for interactive use, not for programmed animation. For that you should use the OO interface. Have you worked through the animation examples? http://matplotlib.sourceforge.net/examples/index.html Mpl is not particularly fast, and some operations like contouring are inherently slow, so unless the fields you are contouring are quite simple you may run into performance problems. For animation of contours, you normally want to have contours at fixed intervals, so I expect you will want to specify those contour levels as an argument to the contour and contourf functions (or Axes methods, when you switch to an OO style.) That will allow drawing the colorbar only once. Eric Here is a link to my project, the graph code is all in gui.py the rest of the files are for the generation of the data. http://code.google.com/p/scc08/source/browse/#svn/branch/realistic2d -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users I have gotten that far the calculations take so long the rendering speed is not too important. I have been working on this and I got the subtitle to animate. My current problem involves the colorbar. When I update the contour graph and the titles the written over cleanly, but when the colorbar is redrawn it draws a second one right next to it. Reading other threads I tried the clf command but the makes the animation kludgy and it has to reshrink all of the graphs and such. Again, don't use the pyplot interface! For an animation, avoid having to redraw the colorbar at all; and don't use the pyplot colorbar command, use the Figure.colorbar method, and explicitly pass in the colorbar axes to use, via the cax kwarg. Don't leave creation of its axes to the colorbar method itself more than once, because it will always create a new one. Eric -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Animate contour plot and color bar
Ok so I have been looking into the Figure class and I still not clear on how figure works. Does it contain all of the normal functions that are in pylab? Does it just contain axes which are are where the graphs are, like subplots in pylab? Do I need to use figure inside of wx widgets or other windowing toolkit? (It seems from the examples this is true) Any help understanding this would be appreciated. efiring wrote: Deltarodigy wrote: efiring wrote: Deltarodigy wrote: For my program I have been trying to animate a contour plot, the color bar, and a subtitle saying what time step it is. I have gotten the graph to write over itself but cannot get it clear the screen properly. Currently using the clf function the wipe is visible messing with animation. This is because all pylab/pyplot functions include a draw_if_interactive. They are intended for interactive use, not for programmed animation. For that you should use the OO interface. Have you worked through the animation examples? http://matplotlib.sourceforge.net/examples/index.html Mpl is not particularly fast, and some operations like contouring are inherently slow, so unless the fields you are contouring are quite simple you may run into performance problems. For animation of contours, you normally want to have contours at fixed intervals, so I expect you will want to specify those contour levels as an argument to the contour and contourf functions (or Axes methods, when you switch to an OO style.) That will allow drawing the colorbar only once. Eric Here is a link to my project, the graph code is all in gui.py the rest of the files are for the generation of the data. http://code.google.com/p/scc08/source/browse/#svn/branch/realistic2d -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users I have gotten that far the calculations take so long the rendering speed is not too important. I have been working on this and I got the subtitle to animate. My current problem involves the colorbar. When I update the contour graph and the titles the written over cleanly, but when the colorbar is redrawn it draws a second one right next to it. Reading other threads I tried the clf command but the makes the animation kludgy and it has to reshrink all of the graphs and such. Again, don't use the pyplot interface! For an animation, avoid having to redraw the colorbar at all; and don't use the pyplot colorbar command, use the Figure.colorbar method, and explicitly pass in the colorbar axes to use, via the cax kwarg. Don't leave creation of its axes to the colorbar method itself more than once, because it will always create a new one. Eric -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- View this message in context: http://www.nabble.com/Animate-contour-plot-and-color-bar-tp22671942p22673591.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users