subplots [xy]labels

two plots in a figure:

···

########################################################################
from pylab import *
...
f,a = subplots(nrows=2, sharex=False, sharey=False)
a[0].plot(x,f0(x))
ylabel('f1')
xlabel('t')
...
a[1].plot(x,f1(x))
ylabel('f2')
xlabel('t')
...
show()
########################################################################
but all i can get are labels for ONLY the lower subplot, what shoud I do?

any help will be appreciated

tia
                                                        gb

Hi Giacomo,

Try using the set_ylabel() and set_xlabel() methods for each Axes instance instead, eg:

a[0].set_ylabel(‘f1’)

a[0].set_xlabel(‘t’)

a[1].set_ylabel(‘f2’)

a[1].set_xlabel(‘t’)

···

On Fri, Jan 4, 2013 at 5:44 AM, <giacomo.boffi@…4255…> wrote:

two plots in a figure:

########################################################################

from pylab import *

f,a = subplots(nrows=2, sharex=False, sharey=False)

a[0].plot(x,f0(x))

ylabel(‘f1’)

xlabel(‘t’)

a[1].plot(x,f1(x))

ylabel(‘f2’)

xlabel(‘t’)

show()

########################################################################

but all i can get are labels for ONLY the lower subplot, what shoud I do?

any help will be appreciated

tia

                                                    gb

Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and

much more. Get web development skills now with LearnDevNow -

350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.

SALE $99.99 this month only – learn more at:

http://p.sf.net/sfu/learnmore_122812


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

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


Alex Goodman
University of Illinois at Urbana-Champaign

Email: goodma13@…2133…