Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Deprecate trying to set minor ticks in 3D #15003

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions 5 doc/api/next_api_changes/2019-08-07-TH.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Deprecations
````````````

`Axes3D` does not support minor ticks. Passing a ``minor`` parameter to
``set_x/y/zticks`` did not have an effect and is now deprecated.
51 changes: 45 additions & 6 deletions 51 lib/mpl_toolkits/mplot3d/axes3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,25 +841,64 @@ def set_zscale(self, value, **kwargs):
self._update_transScale()
self.stale = True

def set_zticks(self, *args, **kwargs):
def set_xticks(self, ticks, minor=False):
"""
Set z-axis tick locations.
See :meth:`matplotlib.axes.Axes.set_yticks` for more details.
Set the x-axis tick locations.

.. note::
Minor ticks are not supported.
Minor ticks are not supported by Axes3D objects.
"""
# overridden to remove the non-working 'minor' parameter from the API
if minor is not False:
cbook.warn_deprecated(
"3.2", message="Minor ticks are not supported by Axes3D "
"objects. Passing minor=True will become an "
"error in future versions of matplotlib."
)
return super().set_xticks(ticks)

def set_yticks(self, ticks, minor=False):
"""
Set the y-axis tick locations.

.. note::
Minor ticks are not supported by Axes3D objects.
"""
# overridden to remove the non-working 'minor' parameter from the API
if minor is not False:
cbook.warn_deprecated(
"3.2", message="Minor ticks are not supported by Axes3D "
"objects. Passing minor=True will become an "
"error in future versions of matplotlib."
)
return super().set_yticks(ticks)

def set_zticks(self, ticks, minor=False):
"""
Set the z-axis tick locations.

.. note::
Minor ticks are not supported by Axes3D objects.

.. versionadded:: 1.1.0
"""
return self.zaxis.set_ticks(*args, **kwargs)
if minor is not False:
cbook.warn_deprecated(
"3.2", message="Minor ticks are not supported by Axes3D "
"objects. Passing minor=True will become an "
"error in future versions of matplotlib."
)
ret = self.zaxis.set_ticks(ticks)
self.stale = True
return ret

def get_zticks(self, minor=False):
"""
Return the z ticks as a list of locations
See :meth:`matplotlib.axes.Axes.get_yticks` for more details.

.. note::
Minor ticks are not supported.
Minor ticks are not supported by Axes3D objects.

.. versionadded:: 1.1.0
"""
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.