I would like to change the color of the yticklabels. I tried to use this command:

ax1.set_xlabel('t [sec]')

but it gives an error:

TypeError: set_yticklabels() takes at least 2 non-keyword arguments (1 given)
if I write instead
it works, but it puts clearly labels 1 and 2... I don't want to change the labels, only the color! is there anyway of doing it?
Hope you can help me

> Date: Thu, 22 May 2008 14:52:13 +0200
> From: david.simpson@chalmers.se
> To: matplotlib-users@lists.sourceforge.net
> Subject: [Matplotlib-users] Legend labels - interaction with functions
> This is probably my lack of knowledge of python, but how do I set up
> legend labels for some bar-plots that have been produced inside a
> function. For example, the following will nicely plot my bar-plots, but
> then legend doesn't know about the colours used, so here just uses black
> for both labels. I'd like the labels to have the same colour as the bars
> generated inside plotb. (I am using a function here as my real code has
> extra stuff to calculate error-bars and suchlike for each data set.)
> x=arange(0,5)
> y=array([ 1.2, 3.4, 5.4, 2.3, 1.0])
> z=array([ 2.2, 0.7, 0.4, 1.3, 1.2])
> def plotb(x,y,col):
> p=bar(x,y,color=col)
> plotb(x,y,'k')
> plotb(x+0.4,z,'y')
> legend(('YYY,'ZZZ'))
> I tried passing the object "p" through the plotb argument list, but
> python didn't like that. (I am just learning python, and so far haven't
> seen how to pass such objects around.
> Thanks for any tips,
> Dave
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) 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!