Skip to content

Doc Typo: matplotlib.axes.Axes.get_yticklabels / Axis.get_ticklabels #11034

Closed
@jason-neal

Description

@jason-neal

Bug report

Bug summary
get_yticklabels doc refers to x ticks.

Axes.get_yticklabels(minor=False, which=None)
    Get the x tick labels as a list of Text instances.

I went to make a PR but was unsure where to make the change.

I found a get_yticklabels() function in axes/_base.py but it has correct docs.

def get_yticklabels(self, minor=False, which=None):
"""
Get the y tick labels as a list of :class:`~matplotlib.text.Text`

It does however use a get_ticklabels method.
Finding a get_ticklabels method of the Axis class I see that the documentation specifically references x ticks.

def get_ticklabels(self, minor=False, which=None):
"""
Get the x tick labels as a list of :class:`~matplotlib.text.Text`

This may be where the typo is coming from. But I am not sure if this is just a different typo.

Expected outcome
Should be probably be

Axes.get_yticklabels(minor=False, which=None)
    Get the y tick labels as a list of Text instances.

Some guidance on where to make the changes and I can do a PR.
Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions