Skip to content

Commit bd0298d

Browse files
committed
add draggable to legend parameters
1 parent 5c45952 commit bd0298d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/legend.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,8 @@ def __init__(
342342
title_fontproperties=None, # properties for the legend title
343343
alignment="center", # control the alignment within the legend box
344344
*,
345-
ncol=1 # synonym for ncols (backward compatibility)
345+
ncol=1, # synonym for ncols (backward compatibility)
346+
draggable=None # whether the legend can be dragged with the mouse
346347
):
347348
"""
348349
Parameters
@@ -537,7 +538,9 @@ def val_or_rc(val, rc_name):
537538
title_prop_fp.set_size(title_fontsize)
538539

539540
self.set_title(title, prop=title_prop_fp)
541+
540542
self._draggable = None
543+
self.set_draggable(state=draggable)
541544

542545
# set the text color
543546

0 commit comments

Comments
 (0)