Hello,
I would like to change the color of the yticklabels. I tried to use this
command:
ax1=p.subplot(212)
ax1.set_xlabel('t [sec]')
ax1.set_ylabel('g^2(q,t)')
ax1.set_yticklabels(color='r')
but it gives an error:
TypeError: set_yticklabels() takes at least 2 non-keyword arguments (1 given)
On Thu, May 22, 2008 at 02:30:24PM +, Chiara Caronna wrote:
Hello,
I would like to change the color of the yticklabels. I tried to use this
command:
ax1=p.subplot(212)
[...]
ax1.set_yticklabels(color='r')
* Solution 1:
In [1]: ax1=subplot(111)
In [2]:
Chiara Caronna [EMAIL PROTECTED] 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')
--
p.setp(ax1.get_yticklabels(), color='r')
This worked!
Thanks a lot!
Chiara
To: matplotlib-users@lists.sourceforge.net
From: [EMAIL PROTECTED]
Date: Thu, 22 May 2008 17:52:09 +0300
Subject: Re: [Matplotlib-users] changing ticklabels color
Chiara Caronna [EMAIL PROTECTED] writes:
ax1