"Stacked" subplots

Hi!
I am coding a little application that shows a number of subplots (of
the 511, 512...515 type) stacked up. They all have the same x-axis,
and I want them to only have the xticks labels on the downward most
axes. The subplots are defined in a matplotlib.figure.Figure object,
and have been created using the add_subplot() method. I am unsure on
how to go about squeezing the plots vertically (although the
subplots_adjust method seems to solve this), and how to get rid of the
axis.

Ideally, I would also like to have a legend OUTSIDE the subplots. Is
this possible given that the Figure is inserted in a wxFrame?

I'm a newbie when it comes to both MPL and wxWindows, so sorry if this
sounds very vague. I'm happy to provide more information, only that
I'm not sure of what! :smiley:

Cheers for your time,
Jose

Hi,
To remove the ticklabels, you could do it with something like
[ax.xaxis.set_ticklabels() for ax in f.axes[:-1]]

David

2006/9/14, Jose Gomez-Dans <
jgomezdans@…287…>:

···

Hi!
I am coding a little application that shows a number of subplots (of

the 511, 512…515 type) stacked up. They all have the same x-axis,
and I want them to only have the xticks labels on the downward most
axes. The subplots are defined in a matplotlib.figure.Figure object,
and have been created using the add_subplot() method. I am unsure on

how to go about squeezing the plots vertically (although the
subplots_adjust method seems to solve this), and how to get rid of the
axis.

Ideally, I would also like to have a legend OUTSIDE the subplots. Is

this possible given that the Figure is inserted in a wxFrame?

I’m a newbie when it comes to both MPL and wxWindows, so sorry if this
sounds very vague. I’m happy to provide more information, only that
I’m not sure of what! :smiley:

Cheers for your time,
Jose


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier

Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

- axes (understand, subplot) have a "is_last_row" method
you can use that to draw ticks on the bottom axis only

- for the legend, try to use the "legend" command of the figure
(something like gcf().legend()