Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add general rcParam mechanism for text #374

Closed
mdboom opened this issue Jun 22, 2011 · 8 comments
Closed

Add general rcParam mechanism for text #374

mdboom opened this issue Jun 22, 2011 · 8 comments

Comments

@mdboom
Copy link
Member

mdboom commented Jun 22, 2011

There is currently axes.labelsize, axes.labelweight etc., but there is no uniform way to set the style defaults for all the different kinds of text in a plot. It would be nice to have a framework for this that was used everywhere.

@WeatherGod
Copy link
Member

Actually, let's generalize this even further to more than just text. For example, consider the parameters for axes objects, but maybe one might want to specify something just for axes3d objects. So something like this:

Consider two rcParam files:

axes.facecolor = 'gray'
axes.3d.facecolor = 'white'

and

axes.facecolor = 'gray'

Then, in axes3d, I specify that I want the facecolor rc param like so: rcParams['axes.3d.facecolor'] and in the first case I would get back 'white' and in the second case I would get back 'gray'. I am not exactly sure how to implement such a thing, but maybe modify the get function to split on periods and successively test for the existance of a parameter that equals the rejoined string minus the second to last element (to the limit of two elements).

@ddale
Copy link
Contributor

ddale commented Oct 28, 2011

If we followed that route, I think it should be "axes3d.facecolor", since there is no "axes.2d.facecolor"

@pelson
Copy link
Member

pelson commented Oct 18, 2012

I think this needs an MEP. @mdboom & @WeatherGod seem like the likely candidates, but if anyone else wanted to give it a shot, say so in this issue.

Thanks,

@astrofrog
Copy link
Contributor

@mdboom - I was going to open a new issue but I think you are suggesting the same thing. I want to be able to set a different font family for the axis labels and the tick labels. I don't think this is something that can currently be done?

@tacaswell
Copy link
Member

This should be folded into @tonysyu s style sheet work.

@tonysyu
Copy link
Contributor

tonysyu commented Oct 17, 2013

If I'm reading this correctly, then my comment on issue #2467 might by relevant:
#2467 (comment)
(EDIT: Accidentally hit green button.)
It allows arbitrary mappings to default parameters, but those mappings have to be set manually. But at least there's a sketch of an implementation. :)

@tacaswell
Copy link
Member

Should be addressed in #2637

@tacaswell
Copy link
Member

Closing this as this is in the scope of the planned work re a DOM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants