Skip to content

What is the use of Tick.set_label2 and can we make it useful? #8181

@ImportanceOfBeingErnest

Description

@ImportanceOfBeingErnest

Coming from this question, How to set tick label2 in matplotlib at stackoverflow, I wonder what the use of YTick.set_label2 is. It says "Set the text of ticklabel2" but actually any text set to it is overwritten at drawtime by the text of the label (or label1).

Also, ax.yaxis.set_ticklabels() cannot be used to independently set the label2, as the same text seems to be written into both Text instances.

Finally, there is only one single formatter for each axis, and both, label1 and label2 share that same formatter.

There are several questions arising from that:
(1) Why is there a set_label2 method at all, if it actually only copies text from label1.
(2) The original question: How to use a different text for label2 as for label1
(3) The wishlist question: Can we have a independent formatter for label2, which would make this label2 actually useful (e.g. show the same data in two different units, show correlated data in terms of two different quantities etc.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github Action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions