From: Darren D. <dd...@co...> - 2006-02-09 16:53:48
|
On Thursday 09 February 2006 11:22, you wrote: > >>>>> "Darren" == Darren Dale <dd...@co...> writes: > > Darren> I just want to double check before I commit this. We offer > Darren> a font.size rc setting, and users can modify that size by > Darren> setting fontsize='medium' or 'large', etc. However, > Darren> font.size does not globally set the default font size, to > Darren> axis labels, ticklabels, etc, they remain 12pt as > Darren> default. Should this be changed? If so, the change is > Darren> simple: from this: def __init__(self, size=12.0, > Darren> weight='normal'): to this: def __init__(self, > Darren> size=rcParams['font.size'], weight='normal'): > > If you want to use rc defaults for kwargs, you do not want to use them > in the function definition, because then they will be set a module > load time and the defaults cannot be changed dynamically. Rather, you > want to use this idiom (eg lines.py) > > > def __init__(self, xdata, ydata, > linewidth = None, # all Nones default to rc > ...): > if linewidth is None : linewidth=rcParams['lines.linewidth'] > > Then if the user changes the rc param value, the constructor default > changes too. Ok. So currently a user can put font.size:23.0, or font.size:medium or even "large". The latter makes things very confusing, because who knows what the reference point is? (Its 12, but its not clear.) I propose the following change: font.defaultsize demands a point size, and then allow the relative font sizes to scale that size. Also, add a text.fontsize rc parameter to allow such scaling for text (this is what font.size does now, I think). Are these changes ok, or should I just leave everything alone? Darren |