Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1d555c0

Browse files
committed
fix errors in processing handle style
1 parent 1482f77 commit 1d555c0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/matplotlib/widgets.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,9 @@ def __init__(self, ax, label, valmin, valmax, valinit=0.5, valfmt=None,
424424
self.valinit = valinit
425425

426426
defaults = {'facecolor': 'white', 'edgecolor': '.75', 'size': 10}
427+
handle_style = {} if handle_style is None else handle_style
427428
marker_props = {
428-
f'marker{k}': v for k, v in {**defaults, **handle_style}
429+
f'marker{k}': v for k, v in {**defaults, **handle_style}.items()
429430
}
430431

431432
if orientation == 'vertical':
@@ -687,8 +688,9 @@ def __init__(
687688
self.valinit = valinit
688689

689690
defaults = {'facecolor': 'white', 'edgecolor': '.75', 'size': 10}
691+
handle_style = {} if handle_style is None else handle_style
690692
marker_props = {
691-
f'marker{k}': v for k, v in {**defaults, **handle_style}
693+
f'marker{k}': v for k, v in {**defaults, **handle_style}.items()
692694
}
693695

694696
if orientation == "vertical":

0 commit comments

Comments
 (0)