Skip to content

Add general rcParam mechanism for text #374

Closed

Description

@mdboom

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.

Activity

  1. WeatherGod commented on Jun 22, 2011

    @WeatherGod
    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).

  2. ddale commented on Oct 28, 2011

    @ddale
    Contributor

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

  3. pelson commented on Oct 18, 2012

    @pelson
    Member

    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,

  4. astrofrog commented on Oct 17, 2013

    @astrofrog
    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?

  5. tacaswell commented on Oct 17, 2013

    @tacaswell
    Member

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

  6. tonysyu commented on Oct 17, 2013

    @tonysyu
    Contributor

    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. :)

  7. tacaswell commented on Jan 17, 2014

    @tacaswell
    Member

    Should be addressed in #2637

  8. tacaswell commented on Aug 18, 2014

    @tacaswell
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions