8000 Merge pull request #3310 from cgohlke/patch-6 · matplotlib/matplotlib@1787fb1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1787fb1

Browse files
committed
Merge pull request #3310 from cgohlke/patch-6
Fix MatplotlibDeprecationWarning: The "loc" positional argument to legend is deprecated
2 parents 3540dff + 81005ee commit 1787fb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/pylab_examples/legend_demo2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
l2, l3 = plt.plot(t2, np.sin(2 * np.pi * t2), '--go', t1, np.log(1 + t1), '.')
1414
l4, = plt.plot(t2, np.exp(-t2) * np.sin(2 * np.pi * t2), 'rs-.')
1515

16-
plt.legend( (l2, l4), ('oscillatory', 'damped'), 'upper right', shadow=True)
16+
plt.legend( (l2, l4), ('oscillatory', 'damped'), loc='upper right', shadow=True)
1717
plt.xlabel('time')
1818
plt.ylabel('volts')
1919
plt.title('Damped oscillation')

0 commit comments

Comments
 (0)
0