changing ticklabels color

Chiara Caronna <chiaracaronna@...32...> writes:

ax1=p.subplot(212)
ax1.set_xlabel('t [sec]')
ax1.set_ylabel('g^2(q,t)')
ax1.set_yticklabels(color='r')

You could do

for label in ax1.get_yticklabels(): label.set_color('r')

or use the setp shortcut:

p.setp(ax1.get_yticklabels(), color='r')

···

--
Jouni K. Sepp�nen
http://www.iki.fi/jks

p.setp(ax1.get_yticklabels(), color=‘r’)
This worked!

Thanks a lot!
Chiara

···

To: matplotlib-users@lists.sourceforge.net
From: jks@…397…
Date: Thu, 22 May 2008 17:52:09 +0300
Subject: Re: [Matplotlib-users] changing ticklabels color

Chiara Caronna <chiaracaronna@…32…> writes:

ax1=p.subplot(212)
ax1.set_xlabel(‘t [sec]’)
ax1.set_ylabel(‘g^2(q,t)’)
ax1.set_yticklabels(color=‘r’)

You could do

for label in ax1.get_yticklabels(): label.set_color(‘r’)

or use the setp shortcut:

p.setp(ax1.get_yticklabels(), color=‘r’)


Jouni K. Seppänen
http://www.iki.fi/jks


This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft® Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/


Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Invite your mail contacts to join your friends list with Windows Live Spaces. It’s easy! Try it!