Skip to content

Axes title default color #14656

Closed
Closed

Description

@OriolAbril

Hi, I have just realized that ax.set_title() uses as default the color defined in rcParams["text.color"] instead of using the color from rcParams["axes.labelcolor"]. Why is that?

In my case, I was trying to create an style for dark figure background and light axes background. Therefore, as the title is on top of the figure background like the axis labels and ticklabels, I expected them to have the same color. Below there are two examples, both have axes.labelcolor white but they have different text.color.

image

image

Maybe 'color': rcParams['axes.labelcolor'] could be added to the default fontdict like axes.titlesize and axes.titleweight?

I added an ax.set_title to the style sheet reference script and only solarized theme will be modified by this. It could affect user made themes though, but I feel that it is more coherent like this.

Activity

  1. timhoffm commented on Jun 30, 2019

    @timhoffm
    Member

    On the danger of proliferation of config parameters (not sure if this is a real problem though), it would be reasonable to make and axes.titlecolor.

  2. OriolAbril commented on Jun 30, 2019

    @OriolAbril
    ContributorAuthor

    Yes, this is also an option, but seeing as only 1 of the available styles has axes.labelcolor different than text.color, I am not sure if this is necessary.

  3. added this to the v3.2.0 milestone on Jul 9, 2019
  4. timhoffm commented on Jul 21, 2019

    @timhoffm
    Member

    Implemented by #14707.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions