wx and matplotlib

I am trying to put together a wxPython frame using py.aui to show multiple matplotlib.figures/canvas.

Would like that each figure takes x percentage of available screen estate. I.e. would like e.g. to have 2 rows with 3 columns of figures/statistics, i.e. 6 graphics.

If the total screen estate is too small then there should be scrollbars per figure/canvas.

Hopefully some samples code (in the example files which existed in 0.90.x) can put me in the right direction, otherwise I will try to put together a stand alone sample (without access to my database) to show my problem.

Werner

Werner F. Bruhin wrote:

I am trying to put together a wxPython frame using py.aui to show multiple matplotlib.figures/canvas.

I'd recommend you take a look at wxMPL -- it's a nice way to embed MPL in wx.

Would like that each figure takes x percentage of available screen estate. I.e. would like e.g. to have 2 rows with 3 columns of figures/statistics, i.e. 6 graphics.

To be clear with the vocabulary -- in MPL, a "figure" would be one wxWindow. In that you can put multiple "axes" which show the actual plots (sometimes referred to as subplots). In this case, I'm not sure if you want more than one MPL figure.

If the total screen estate is too small then there should be scrollbars per figure/canvas.

If you want multiple figures, than this isn't really an MPL question. You'd do that layout the same way you would with any other set of wxWindows -- probably putting them all on a wxScrolledWindow, in Sizers, and giving them a minimum size.

With a single MPL Figure, it would be similar, put it on wxScrolledWindows, with a minimum size set.

Hopefully some samples code (in the example files which existed in 0.90.x)

Is this what you are looking for?

http://matplotlib.sourceforge.net/examples/index.html

in particular, you might want to look at the wx examples here:

http://matplotlib.sourceforge.net/examples/user_interfaces/index.html

-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

Hi Chris,

Christopher Barker wrote:

Werner F. Bruhin wrote:
  

I am trying to put together a wxPython frame using py.aui to show multiple matplotlib.figures/canvas.
    
I'd recommend you take a look at wxMPL -- it's a nice way to embed MPL in wx.
  

I'll have a look at this.

  

Would like that each figure takes x percentage of available screen estate. I.e. would like e.g. to have 2 rows with 3 columns of figures/statistics, i.e. 6 graphics.
    
To be clear with the vocabulary -- in MPL, a "figure" would be one wxWindow. In that you can put multiple "axes" which show the actual plots (sometimes referred to as subplots). In this case, I'm not sure if you want more than one MPL figure.
  

I am not sure yet if multiple axes/subplots is the way to go or to have
multiple figures. I was leaning towards multiple figures, each a pane
in AUI, to allow the user to size them how they want.

  

If the total screen estate is too small then there should be scrollbars per figure/canvas.
    
If you want multiple figures, than this isn't really an MPL question. You'd do that layout the same way you would with any other set of wxWindows -- probably putting them all on a wxScrolledWindow, in Sizers, and giving them a minimum size.

With a single MPL Figure, it would be similar, put it on wxScrolledWindows, with a minimum size set.
  

O.K. will play with this. In the mean time I found also some sample
code from the matplotlib doc/gallery (great piece of documentation!!!!!).

  

Hopefully some samples code (in the example files which existed in 0.90.x)
    

Is this what you are looking for?

http://matplotlib.sourceforge.net/examples/index.html

in particular, you might want to look at the wx examples here:

http://matplotlib.sourceforge.net/examples/user_interfaces/index.html
  

Yes, this is what I was looking for. Although it is a pity that these
do not have the sample graph as is shown in the gallery - but looking at
both I think I should find what I need.

Thanks for the tips
Werner