Asymmetrical arrangements of subplots

    figure
subplot(2,2,1:2)
text(.5,.5,'subplot(2,2,1:2)',...
'FontSize',14,'HorizontalAlignment','center')
subplot(2,2,3)
text(.5,.5,'subplot(2,2,3)',...
'FontSize',14,'HorizontalAlignment','center')
subplot(2,2,4)
text(.5,.5,'subplot(2,2,4)',...
'FontSize',14,'HorizontalAlignment','center')
Reference: [http://www.mathworks.com/help/techdoc/ref/subplot.html](http://www.mathworks.com/help/techdoc/ref/subplot.html)

Dear all,

I have a small question about subplot. I want to avoid creating plot

axes manually using pylab.axes, to create an asymmetrical
arrangement of subplots like the following code in Matlab:

Is it possible in matplotlib?

Cheers,
Sebastian
···


Sebastian Krieger, M.Sc.

    Laboratório de Oceanografia por Satélites

    Instituto Oceanográfico – Universidade de São Paulo

    Praça do Oceanográfico, 191 – São Paulo, SP – 05508-120 – Brasil

    Cel.: +55 (11) 9241-5606 – Tel.: +55 (11) 3091-6575 – Skype:

regeirk

    Www: [los.io.usp.br](http://los.io.usp.br) – E-mail:

sebastian.krieger@…3597…

    Currículo Lattes: [lattes.cnpq.br/3216430385408182](http://lattes.cnpq.br/3216430385408182%20)

2011/5/5 Sebastian Krieger <sebastian.krieger@...3597...>:

Dear all,

I have a small question about subplot. I want to avoid creating plot axes
manually using pylab.axes, to create an asymmetrical arrangement of subplots
like the following code in Matlab:

figure
subplot(2,2,1:2)
text(.5,.5,'subplot(2,2,1:2)',...
    'FontSize',14,'HorizontalAlignment','center')
subplot(2,2,3)
text(.5,.5,'subplot(2,2,3)',...
    'FontSize',14,'HorizontalAlignment','center')
subplot(2,2,4)
text(.5,.5,'subplot(2,2,4)',...
    'FontSize',14,'HorizontalAlignment','center')

Reference: http://www.mathworks.com/help/techdoc/ref/subplot.html

Is it possible in matplotlib?

Easier done than explained:

import matplotlib.pyplot as plt
plt.subplot(121)
plt.subplot(222)
plt.subplot(224)
plt.show()

Goyo

2011/5/4 Sebastian Krieger <sebastian.krieger@…3597…>

    figure
subplot(2,2,1:2)
text(.5,.5,'subplot(2,2,1:2)',...
'FontSize',14,'HorizontalAlignment','center')
subplot(2,2,3)
text(.5,.5,'subplot(2,2,3)',...
'FontSize',14,'HorizontalAlignment','center')
subplot(2,2,4)
text(.5,.5,'subplot(2,2,4)',...
'FontSize',14,'HorizontalAlignment','center')
Reference: [http://www.mathworks.com/help/techdoc/ref/subplot.html](http://www.mathworks.com/help/techdoc/ref/subplot.html)

Dear all,

I have a small question about subplot. I want to avoid creating plot

axes manually using pylab.axes, to create an asymmetrical
arrangement of subplots like the following code in Matlab:

Is it possible in matplotlib?



Cheers,

Sebastian

Sebastian,

mpl 1.0.0 came with a powerful gridspec tool for more advanced handling of subplots. Maybe this will be of use to you?

http://matplotlib.sourceforge.net/users/gridspec.html?highlight=gridspec

Ben Root