File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Deprecations
2+ ------------
3+
4+ Support for custom backends that do not provide a ``set_hatch_color `` method is
5+ deprecated. We suggest that custom backends let their ``GraphicsContext ``
6+ class inherit from `GraphicsContextBase `, to at least provide stubs for all
7+ required methods.
Original file line number Diff line number Diff line change @@ -271,8 +271,10 @@ def draw(self, renderer):
271271 gc .set_hatch_color (self ._hatch_color )
272272 except AttributeError :
273273 # if we end up with a GC that does not have this method
274- warnings .warn ("Your backend does not support setting the "
275- "hatch color." )
274+ cbook .warn_deprecated (
275+ "3.1" , "Your backend does not support setting the hatch "
276+ "color; such backends will become unsupported in "
277+ "Matplotlib 3.3." )
276278
277279 if self .get_sketch_params () is not None :
278280 gc .set_sketch_params (* self .get_sketch_params ())
Original file line number Diff line number Diff line change @@ -515,8 +515,10 @@ def draw(self, renderer):
515515 gc .set_hatch_color (self ._hatch_color )
516516 except AttributeError :
517517 # if we end up with a GC that does not have this method
518- warnings .warn (
519- "Your backend does not support setting the hatch color." )
518+ cbook .warn_deprecated (
519+ "3.1" , "Your backend does not support setting the hatch "
520+ "color; such backends will become unsupported in "
521+ "Matplotlib 3.3." )
520522
521523 if self .get_sketch_params () is not None :
522524 gc .set_sketch_params (* self .get_sketch_params ())
@@ -4285,8 +4287,10 @@ def draw(self, renderer):
42854287 gc .set_hatch_color (self ._hatch_color )
42864288 except AttributeError :
42874289 # if we end up with a GC that does not have this method
4288- warnings .warn ("Your backend does not support setting the "
4289- "hatch color." )
4290+ cbook .warn_deprecated (
4291+ "3.1" , "Your backend does not support setting the "
4292+ "hatch color; such backends will become unsupported "
4293+ "in Matplotlib 3.3." )
42904294
42914295 if self .get_sketch_params () is not None :
42924296 gc .set_sketch_params (* self .get_sketch_params ())
You can’t perform that action at this time.
0 commit comments