Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bd0298d

Browse filesBrowse files
committed
add draggable to legend parameters
1 parent 5c45952 commit bd0298d
Copy full SHA for bd0298d

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed

‎lib/matplotlib/legend.py

Copy file name to clipboardExpand all lines: lib/matplotlib/legend.py
+4-1Lines changed: 4 additions & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.