Skip to content

DOC: add numpydoc docstring + commentary to Axis.get_ticklocs #23746

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

Merged
merged 1 commit into from
Aug 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion lib/matplotlib/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,22 @@ def get_minorticklocs(self):
return minor_locs

def get_ticklocs(self, *, minor=False):
"""Return this Axis' tick locations in data coordinates."""
"""
Return this Axis' tick locations in data coordinates.

The locations are not clipped to the current axis limits and hence
may contain locations that are not visible in the output.

Parameters
----------
minor : bool, default: False
True to return the minor tick directions,
False to return the major tick directions.

Returns
-------
numpy array of tick locations
"""
return self.get_minorticklocs() if minor else self.get_majorticklocs()

def get_ticks_direction(self, minor=False):
Expand Down