Skip to content

Commit ecae132

Browse files
committed
Remove support for backends without set_hatch_color.
1 parent 2088794 commit ecae132

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

doc/api/api_changes_3.3/removals.rst

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Classes, methods and attributes
1313

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

16+
- Support for custom backends that do not provide a
17+
``backend_bases.GraphicsContextBase.set_hatch_color`` method
1618
- ``backend_bases.RendererBase.strip_math()``
1719
(use ``cbook.strip_math()`` instead)
1820

lib/matplotlib/collections.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -302,14 +302,7 @@ def draw(self, renderer):
302302

303303
if self._hatch:
304304
gc.set_hatch(self._hatch)
305-
try:
306-
gc.set_hatch_color(self._hatch_color)
307-
except AttributeError:
308-
# if we end up with a GC that does not have this method
309-
cbook.warn_deprecated(
310-
"3.1", message="Your backend does not support setting the "
311-
"hatch color; such backends will become unsupported in "
312-
"Matplotlib 3.3.")
305+
gc.set_hatch_color(self._hatch_color)
313306

314307
if self.get_sketch_params() is not None:
315308
gc.set_sketch_params(*self.get_sketch_params())

lib/matplotlib/patches.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -553,14 +553,7 @@ def _bind_draw_path_function(self, renderer):
553553

554554
if self._hatch:
555555
gc.set_hatch(self._hatch)
556-
try:
557-
gc.set_hatch_color(self._hatch_color)
558-
except AttributeError:
559-
# if we end up with a GC that does not have this method
560-
cbook.warn_deprecated(
561-
"3.1", message="Your backend does not support setting the "
562-
"hatch color; such backends will become unsupported in "
563-
"Matplotlib 3.3.")
556+
gc.set_hatch_color(self._hatch_color)
564557

565558
if self.get_sketch_params() is not None:
566559
gc.set_sketch_params(*self.get_sketch_params())

0 commit comments

Comments
 (0)