We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8e37be commit dbdb3b9Copy full SHA for dbdb3b9
lib/matplotlib/backends/qt_editor/figureoptions.py
@@ -59,13 +59,14 @@ def figure_edit(axes, parent=None):
59
60
# Sorting for default labels (_lineXXX, _imageXXX).
61
def cmp_key(label):
62
- if type(label) == tuple:
63
- label = label[0]
64
- match = re.match(r"(_line|_image)(\d+)", label)
+ """
+ label should be a tuple consisting of the string label, and the object being sorted by label
65
+ match = re.match(r"(_line|_image)(\d+)", label[0])
66
if match:
67
return match.group(1), int(match.group(2))
68
else:
- return label, 0
69
+ return label[0], 0
70
71
# Get / Curves
72
labeled_lines = []
0 commit comments