8000 Removed _set_hatch_linewidth and pulled back unwanted changes · matplotlib/matplotlib@e949945 · GitHub
[go: up one dir, main page]

Skip to content

Commit e949945

Browse files
committed
Removed _set_hatch_linewidth and pulled back unwanted changes
1 parent 3c417ab commit e949945

File tree

5 files changed

+12
-23
lines changed

5 files changed

+12
-23
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,19 +1007,9 @@ def get_hatch_linewidth(self):
10071007
return self._hatch_linewidth
10081008

10091009
def set_hatch_linewidth(self, hatch_linewidth):
1010-
"""Set the hatch linewidth."""
1010+
"""Set the hatch linewidth - not supported on all backends."""
10111011
self._hatch_linewidth = hatch_linewidth
10121012

1013-
def _set_hatch_linewidth(self, hatch_linewidth):
1014-
if hasattr(self, "set_hatch_linewidth"):
1015-
self.set_hatch_linewidth(hatch_linewidth)
1016-
else:
1017-
_api.warn_deprecated(
1018-
"3.8", message="The current backend does not define "
1019-
"GraphicsContextRenderer.set_hatch_linewidth; support for such "
1020-
"backends is deprecated since %(since)s and will be removed "
1021-
"%(removal)s.")
1022-
10231013
def get_sketch_params(self):
10241014
"""
10251015
Return the sketch parameters for the artist.

lib/matplotlib/backend_bases.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ class GraphicsContextBase:
168168
def set_hatch_color(self, hatch_color: ColorType) -> None: ...
169169
def get_hatch_linewidth(self) -> float: ...
170170
def set_hatch_linewidth(self, hatch_linewidth: float) -> None: ...
171-
def _set_hatch_linewidth(self, hatch_linewidth: float) -> None: ...
172171
def get_sketch_params(self) -> tuple[float, float, float] | None: ...
173172
def set_sketch_params(
174173
self,

lib/matplotlib/backends/backend_pdf.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2575,16 +2575,16 @@ def clip_cmd(self, cliprect, clippath):
25752575

25762576
commands = (
25772577
# must come first since may pop
2578-
(("_cliprect", "_clippath"), clip_cmd),
2579-
(("_alpha", "_forced_alpha", "_effective_alphas"), alpha_cmd),
2580-
(("_capstyle",), capstyle_cmd),
2581-
(("_fillcolor",), fillcolor_cmd),
2582-
(("_joinstyle",), joinstyle_cmd),
2583-
(("_linewidth",), linewidth_cmd),
2584-
(("_dashes",), dash_cmd),
2585-
(("_rgb",), rgb_cmd),
2578+
(('_cliprect', '_clippath'), clip_cmd),
2579+
(('_alpha', '_forced_alpha', '_effective_alphas'), alpha_cmd),
2580+
(('_capstyle',), capstyle_cmd),
2581+
(('_fillcolor',), fillcolor_cmd),
2582+
(('_joinstyle',), joinstyle_cmd),
2583+
(('_linewidth',), linewidth_cmd),
2584+
(('_dashes',), dash_cmd),
2585+
(('_rgb',), rgb_cmd),
25862586
# must come after fillcolor and rgb
2587-
(("_hatch", "_hatch_color", "_hatch_linewidth"), hatch_cmd),
2587+
(('_hatch', '_hatch_color', '_hatch_linewidth'), hatch_cmd),
25882588
)
25892589

25902590
def delta(self, other):

lib/matplotlib/collections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def draw(self, renderer):
364364
if self._hatch:
365365
gc.set_hatch(self._hatch)
366366
gc.set_hatch_color(self._hatch_color)
367-
gc._set_hatch_linewidth(self._hatch_linewidth)
367+
gc.set_hatch_linewidth(self._hatch_linewidth)
368368

369369
if self.get_sketch_params() is not None:
370370
gc.set_sketch_params(*self.get_sketch_params())

lib/matplotlib/patches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ def _draw_paths_with_artist_properties(
614614
if self._hatch:
615615
gc.set_hatch(self._hatch)
616616
gc.set_hatch_color(self._hatch_color)
617-
gc._set_hatch_linewidth(self._hatch_linewidth)
617+
gc.set_hatch_linewidth(self._hatch_linewidth)
618618

619619
if self.get_sketch_params() is not None:
620620
gc.set_sketch_params(*self.get_sketch_params())

0 commit comments

Comments
 (0)
0