-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Remove APIs deprecated in mpl3.0. #14244
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
API removals | ||
```````````` | ||
|
||
The following deprecated APIs were removed: | ||
|
||
- the ``matplotlib.backends.tkagg``, ``matplotlib.backends.windowing``, | ||
``matplotlib.backends.wx_compat``, and ``matplotlib.compat.subprocess`` | ||
modules, | ||
- ``RcParams.msg_depr``, ``RcParams.msg_depr_ignore``, | ||
``RcParams.msg_depr_set``, ``RcParams.msg_obsolete``, | ||
``RcParams.msg_backend_obsolete``, | ||
- ``afm.parse_afm`` (use ``afm.AFM instead``), | ||
- ``axes.Axes.mouseover_set``, | ||
- ``backend_cairo.ArrayWrapper``, ``backend_cairo.RendererCairo.convert_path``, | ||
- ``backend_gtk3.FileChooserDialog.sorted_filetypes`` (use | ||
``sorted(self.filetypes.items())`` instead), | ||
- ``backend_pgf.get_texcommand``, | ||
- ``backend_pdf.PdfFile.texFontMap``, | ||
- ``backend_ps.get_bbox``, | ||
- ``backend_qt.FigureCanvasQt.keyAutoRepeat`` (use | ||
``event.guiEvent.isAutoRepeat`` instead), ``backend_qt.error_msg_qt``, | ||
``backend_qt.exception_handler``, | ||
- ``backend_wx.FigureCanvasWx.macros``, | ||
- ``backends.pylab_setup``, | ||
- ``cbook.Bunch`` (use ``types.SimpleNamespace`` instead), ``cbook.Locked``, | ||
``cbook.unicode_safe``, ``cbook.is_numlike`` (use | ||
``isinstance(..., numbers.Number)`` instead), ``cbook.mkdirs`` (use | ||
``os.makedirs(..., exist_ok=True)`` instead), ``cbook.GetRealpathAndStat`` | ||
(use ``cbook.get_realpath_and_stat`` instead), | ||
``cbook.listFiles``, | ||
- ``container.Container.set_remove_method``, | ||
- ``contour.ContourLabeler.cl``, ``contour.ContourLabeler.cl_xy``, | ||
``contour.ContourLabeler.cl_cvalues`` (use ``labelTexts``, ``labelXYs``, | ||
``labelCValues`` instead), | ||
- ``dates.DateFormatter.strftime``, ``dates.DateFormatter.strftime_pre_1900``, | ||
- ``font_manager.TempCache``, ``font_manager.FontManager.ttffiles``, | ||
``font_manager.FontManager.afmfiles``, | ||
- ``mathtext.unichr_safe`` (use ``chr`` instead), | ||
- ``patches.YAArrow`` (use ``patches.FancyArrowPatch`` instead), | ||
- ``sphinxext.plot_directive.remove_coding``, | ||
- ``table.Table.get_child_artists``, | ||
- ``testing.compare.compare_float``, ``testing.decorators.CleanupTest``, | ||
``testing.decorators.ImageComparisonTest``, | ||
``testing.decorators.skip_if_command_unavailable``, | ||
support for nose-based tests, | ||
- ``text.Annotation.arrow`` (use ``text.Annotation.arrow_patch`` instead), | ||
- ``textpath.TextToPath.tex_font_map``, | ||
- ``ticker.Base``, ``ticker.closeto``, ``ticker.nearest_long``, | ||
- ``axes_grid1.axes_divider.LocatableAxesBase``, | ||
``axes_grid1.axes_divider.locatable_axes_factory``, | ||
``axes_grid1.axes_divider.Axes`` (use ``axes_grid1.mpl_axes.Axes`` instead), | ||
``axes_grid1.axes_divider.LocatableAxes`` (use ``axes_grid1.mpl_axes.Axes`` | ||
instead), | ||
- ``axisartist.axes_divider.Axes``, ``axisartist.axes_divider.LocatableAxes`` | ||
(use ``axisartist.axislines.Axes`` instead), | ||
- the ``normed`` kwarg to ``hist`` (use ``density`` instead), | ||
- the ``verts`` parameter to ``scatter`` (use ``marker`` instead), | ||
- passing ``(verts, 0)`` or ``(..., 3)`` when specifying a marker to specify a | ||
path or a circle, respectively (instead, use ``verts`` or ``"o"``, | ||
respectively), | ||
- :rc:`examples.directory`, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,6 @@ Classes | |
RegularPolygon | ||
Shadow | ||
Wedge | ||
YAArrow | ||
|
||
Functions | ||
--------- | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4313,6 +4313,7 @@ def _parse_scatter_color_args(c, edgecolors, kwargs, xsize, | |
"edgecolors", "c", "facecolor", | ||
"facecolors", "color"], | ||
label_namer="y") | ||
@cbook._delete_parameter("3.2", "verts") | ||
def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None, | ||
vmin=None, vmax=None, alpha=None, linewidths=None, | ||
verts=None, edgecolors=None, *, plotnonfinite=False, | ||
|
@@ -4465,13 +4466,6 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None, | |
|
||
scales = s # Renamed for readability below. | ||
|
||
# to be API compatible | ||
if verts is not None: | ||
cbook.warn_deprecated("3.0", name="'verts'", obj_type="kwarg", | ||
alternative="'marker'") | ||
if marker is None: | ||
marker = verts | ||
|
||
# load default marker from rcParams | ||
if marker is None: | ||
marker = rcParams['scatter.marker'] | ||
|
@@ -6394,8 +6388,7 @@ def clabel(self, CS, *args, **kwargs): | |
def hist(self, x, bins=None, range=None, density=None, weights=None, | ||
cumulative=False, bottom=None, histtype='bar', align='mid', | ||
orientation='vertical', rwidth=None, log=False, | ||
color=None, label=None, stacked=False, normed=None, | ||
**kwargs): | ||
color=None, label=None, stacked=False, **kwargs): | ||
""" | ||
Plot a histogram. | ||
|
||
|
@@ -6576,9 +6569,6 @@ def hist(self, x, bins=None, range=None, density=None, weights=None, | |
|
||
Default is ``False`` | ||
|
||
normed : bool, optional | ||
Deprecated; use the density keyword argument instead. | ||
|
||
Returns | ||
------- | ||
n : array or list of arrays | ||
|
@@ -6628,15 +6618,6 @@ def hist(self, x, bins=None, range=None, density=None, weights=None, | |
if histtype == 'barstacked' and not stacked: | ||
stacked = True | ||
|
||
if density is not None and normed is not None: | ||
raise ValueError("kwargs 'density' and 'normed' cannot be used " | ||
"simultaneously. " | ||
"Please only use 'density', since 'normed'" | ||
"is deprecated.") | ||
if normed is not None: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks, fixed |
||
cbook.warn_deprecated("2.1", name="'normed'", obj_type="kwarg", | ||
alternative="'density'", removal="3.1") | ||
|
||
# basic input validation | ||
input_empty = np.size(x) == 0 | ||
# Massage 'x' for processing. | ||
|
@@ -6708,7 +6689,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None, | |
else: | ||
hist_kwargs['range'] = bin_range | ||
|
||
density = bool(density) or bool(normed) | ||
density = bool(density) | ||
if density and not stacked: | ||
hist_kwargs['density'] = density | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verts
should be be removed from the method signature. Unfortunately, strictly speaking this would be a breaking change again because you change the position ofedgecolors
. But nevertheless I think that's what we should do - and sinceedgecolors
is changing its position anyway, you can move the kwonly marker*
before it.The alternative would be to keep
verts
and raise a TypeError here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a
_delete_parameter
onverts
. Sure, that'll take two more minor versions before removing it from the signature, but heh, there's no urgency either...