Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Force locator and formatter inheritance#18203

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 1 commit intomatplotlib:masterfromdstansby:tick-form-depr
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes fromall 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 deletionsdoc/api/next_api_changes/behavior/18203-DS.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
Locators and formatters
~~~~~~~~~~~~~~~~~~~~~~~

Axis locators and formatters must now be subclasses of
`~matplotlib.ticker.Locator` and `~matplotlib.ticker.Formatter` respectively.
12 changes: 4 additions & 8 deletionslib/matplotlib/axis.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -577,10 +577,8 @@ def locator(self):
@locator.setter
def locator(self, locator):
if not isinstance(locator, mticker.Locator):
cbook.warn_deprecated(
"3.2", message="Support for locators that do not subclass "
"matplotlib.ticker.Locator is deprecated since %(since)s and "
"support for them will be removed %(removal)s.")
raise TypeError('locator must be a subclass of '
'matplotlib.ticker.Locator')
self._locator = locator

@property
Expand All@@ -590,10 +588,8 @@ def formatter(self):
@formatter.setter
def formatter(self, formatter):
if not isinstance(formatter, mticker.Formatter):
cbook.warn_deprecated(
"3.2", message="Support for formatters that do not subclass "
"matplotlib.ticker.Formatter is deprecated since %(since)s "
"and support for them will be removed %(removal)s.")
raise TypeError('formatter must be a subclass of '
'matplotlib.ticker.Formatter')
self._formatter = formatter


Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp