From 5190182e6ea4c28ceeb45cc17cf2e55fe3e30f4b Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Fri, 4 Apr 2025 17:51:53 -0500 Subject: [PATCH] fix patch examples --- data_prototype/patches.py | 6 +++--- examples/simple_patch.py | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/data_prototype/patches.py b/data_prototype/patches.py index d83262f..e14f225 100644 --- a/data_prototype/patches.py +++ b/data_prototype/patches.py @@ -51,8 +51,8 @@ def draw(self, renderer, graph: Graph) -> None: "x": desc, "y": desc, "codes": desc, - "facecolor": Desc((), "display"), - "edgecolor": Desc(("M",), "display"), + "facecolor": scalar, + "edgecolor": scalar, "linewidth": scalar, "linestyle": scalar, "hatch": scalar, @@ -93,7 +93,7 @@ def draw(self, renderer, graph: Graph) -> None: if evald["hatch"] is not None: gc.set_hatch(evald["hatch"]) - gc.set_hatch_color(evald["hatch_color"]) + # gc.set_hatch_color(evald["hatch_color"]) # if self.get_sketch_params() is not None: # gc.set_sketch_params(*self.get_sketch_params()) diff --git a/examples/simple_patch.py b/examples/simple_patch.py index ebfe959..63b9057 100644 --- a/examples/simple_patch.py +++ b/examples/simple_patch.py @@ -25,12 +25,10 @@ upper_right_x=np.array(-1), upper_right_y=np.array(3), edgecolor=np.array([0, 0, 0]), - hatch_color=np.array([0, 0, 0]), facecolor="green", linewidth=3, linestyle="-", antialiased=np.array([True]), - hatch="*", fill=np.array([True]), capstyle=np.array(["round"]), joinstyle=np.array(["miter"]), @@ -46,12 +44,10 @@ rotation_point_x=np.array(1), rotation_point_y=np.array(3.5), edgecolor=np.array([0.5, 0.2, 0]), - hatch_color=np.array([0, 0, 0]), facecolor="red", linewidth=6, linestyle="-", antialiased=np.array([True]), - hatch="", fill=np.array([True]), capstyle=np.array(["round"]), joinstyle=np.array(["miter"]),