ristretto wrote:
> 
> import matplotlib.pyplot as pyplot
> 
> fprop=matplotlib.font_manager.FontProperties(size='xx-small')
> 
> pyplot.yticks((70,80,90,100),('70%','80%','90%','100%'),
> color="#8c949d",horizontalalignment='right',fontproperties=fprop )
> 
> This will cause all the kwargs to be ignored, so the color, alignment and
> fonts are all at their default values.
> 
> pyplot.yticks((70,80,90,100),color="#8c949d",horizontalalignment='right',fontproperties=fprop
> )
> 
> this on, on the other hand, works fine.  
> 
> This is showing that when you provide labels for the ticks (second arg to
> yticks), the kwargs are ignored.  Does anyone have any idea why this is
> the case?  
> 

I'm not sure I'll ever really understand Matplotlib.  Why I had to do this,
I don't really know.  It's hard to spec out projects when you think that
setting the font on some text should take no time at all, but it takes hours
due to stupid complexities.   

Rant over, here's what I did

    pyplot.yticks((70,80,90,100),
color="#8c949d",horizontalalignment='right',fontproperties=fprop2 )
   
ax.set_yticklabels(('70%','80%','90%','100%'),color="#8c949d",horizontalalignment='right')

The first line doesn't specify the labels, this works in that it puts 70 80
90 100 as labels, but with correct color and font.

The second line sets the label text, but not the font or color.  

This seems to work.
-- 
View this message in context: 
http://old.nabble.com/pyplot.yticks-ignoring-font-if-labels-are-supplied%2C-any-ideas--tp27553479p27554596.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to