is there a way to modify the toolbars in matplotlib and add more functions, like a button for averaging the data displayed then display it; draw threshold levels and have a spin up button to change the level while drawin= g it?
On Wed, 2006年05月24日 at 17:39 +0800, Allan Noriel Estrella wrote: > is there a way to modify the toolbars in matplotlib and add more > functions, like a button for averaging the data displayed then display > it; draw threshold levels and have a spin up button to change the > level while drawing it? To accomplish similar goals, I embed a matplotlib panel (including toolbar) in a wxPython application (and use the 'WXAgg' backend). Additional GUI elements (menus, controls etc.) can be added around the matplotlib panel for all the additional functionality you might need. With wxPython, the NavigationalToolbar object could easily be subclassed and additional elements added, if need be. You could equally well do this using an alternative toolkit-of-choice (Tk, gtk, Qt etc.). See the "embedding_in_*.py" files from the matplotlib examples set. Bryan
Bryan Cole wrote: > To accomplish similar goals, I embed a matplotlib panel (including > toolbar) in a wxPython application If you do this, be sure to take a look at wxmpl and/or Mplot , they make it a bit easier to embed MPL in wxPython. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...
Allan Noriel Estrella wrote: > can you give the url of wxmpl and Mplot, i had a hard time googling for > them That's rare, but I had trouble too, some of the google links are dead, but I found this for wxmpl: http://agni.phys.iit.edu/~kmcivor/wxmpl/ and this (just the files) for Mplot: http://cars9.uchicago.edu/~newville/Python/MPlot/ If you search this list, you'll see discussion of the differences between them, but I'll try this short synopsis (Kevin and Matt, please correct as needed) wxmpl is designed to make it a bit easier to embed matplotlib in a a wxPython app. Once you've got a PlotPanel (or PlotFrame), you do your plotting with the matplotlib OO API (and some of pylab) Mplot is designed to provide a plotting window that the end-user of the application can interact with, doing at least some manipulation of the plot. It provides and alternative API for plotting that is easy to use, but not feature-complete. Note that I haven't Mplot, so I may have that a bit wrong. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...