Skip to content

Commit acb4b28

Browse files
committed
bug in reordering legend labels
1 parent b415c00 commit acb4b28

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
setup(
44
name='simpleplotlib',
55
packages=['simpleplotlib'],
6-
version='0.14',
6+
version='0.15',
77
description='A matplotlib wrapper focused on beauty and simplicity',
88
author='Matthew K. Mukerjee',
99
author_email='[email protected]',
1010
url='https://github.com/mukerjee/simpleplotlib',
11-
download_url='https://github.com/mukerjee/simpleplotlib/tarball/0.14',
11+
download_url='https://github.com/mukerjee/simpleplotlib/tarball/0.15',
1212
license='MIT License',
1313
keywords=['matplotlib', 'plots', 'beauty', 'simplicity'],
1414
classifiers=[

simpleplotlib/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,9 @@ def plot(x, y, my_options={}, y2=None):
452452
if options.legend.order:
453453
handles = [h
454454
for _, h in sorted(zip(options.legend.order, handles))]
455-
labels = [h
456-
for _, h in sorted(zip(options.legend.order, labels))]
455+
options.legend.options.labels = \
456+
[h for _, h in sorted(zip(options.legend.order,
457+
options.legend.options.labels))]
457458
l = axes[-1].legend(handles=handles,
458459
**options.legend.options.toDict())
459460
for t in l.get_texts():

0 commit comments

Comments
 (0)