Skip to content

Commit

Permalink
Remove support for backends without set_hatch_color.
Browse files Browse the repository at this point in the history
  • Loading branch information
QuLogic committed Apr 25, 2020
1 parent 2088794 commit ecae132
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
2 changes: 2 additions & 0 deletions doc/api/api_changes_3.3/removals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Classes, methods and attributes

- ``axis.Axis.iter_ticks`` (no replacement)

- Support for custom backends that do not provide a
``backend_bases.GraphicsContextBase.set_hatch_color`` method
- ``backend_bases.RendererBase.strip_math()``
(use ``cbook.strip_math()`` instead)

Expand Down
9 changes: 1 addition & 8 deletions lib/matplotlib/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,7 @@ def draw(self, renderer):

if self._hatch:
gc.set_hatch(self._hatch)
try:
gc.set_hatch_color(self._hatch_color)
except AttributeError:
# if we end up with a GC that does not have this method
cbook.warn_deprecated(
"3.1", message="Your backend does not support setting the "
"hatch color; such backends will become unsupported in "
"Matplotlib 3.3.")
gc.set_hatch_color(self._hatch_color)

if self.get_sketch_params() is not None:
gc.set_sketch_params(*self.get_sketch_params())
Expand Down
9 changes: 1 addition & 8 deletions lib/matplotlib/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,14 +553,7 @@ def _bind_draw_path_function(self, renderer):

if self._hatch:
gc.set_hatch(self._hatch)
try:
gc.set_hatch_color(self._hatch_color)
except AttributeError:
# if we end up with a GC that does not have this method
cbook.warn_deprecated(
"3.1", message="Your backend does not support setting the "
"hatch color; such backends will become unsupported in "
"Matplotlib 3.3.")
gc.set_hatch_color(self._hatch_color)

if self.get_sketch_params() is not None:
gc.set_sketch_params(*self.get_sketch_params())
Expand Down

0 comments on commit ecae132

Please sign in to comment.