From c53cb3d839b8133f0fded8b27c7e2f7694a2f30c Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Thu, 8 Apr 2021 12:25:53 +0200 Subject: [PATCH] Fix textbox cursor color, set its linewidth. The cursor used to be black but the default of vlines color now matches `rcParams["lines.color"]` (blue), so change that back to black. Setting the linewidth to 1 also looks a bit nicer (than the thicker default linewidth). --- lib/matplotlib/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/widgets.py b/lib/matplotlib/widgets.py index 333af5257b5a..5f371f64574f 100644 --- a/lib/matplotlib/widgets.py +++ b/lib/matplotlib/widgets.py @@ -1029,7 +1029,7 @@ def __init__(self, ax, label, initial='', self.cursor_index = 0 - self.cursor = ax.vlines(0, 0, 0, visible=False, + self.cursor = ax.vlines(0, 0, 0, visible=False, color="k", lw=1, transform=mpl.transforms.IdentityTransform()) self.connect_event('button_press_event', self._click)