Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9a2eb05

Browse files
timhoffmmeeseeksmachine
authored andcommitted
Backport PR #25956: Reverse stackplot legend to match data display
1 parent ab5e80c commit 9a2eb05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/lines_bars_and_markers/stackplot_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
fig, ax = plt.subplots()
3131
ax.stackplot(year, population_by_continent.values(),
3232
labels=population_by_continent.keys(), alpha=0.8)
33-
ax.legend(loc='upper left')
33+
ax.legend(loc='upper left', reverse=True)
3434
ax.set_title('World population')
3535
ax.set_xlabel('Year')
3636
ax.set_ylabel('Number of people (millions)')

0 commit comments

Comments
 (0)