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 602a0ff

Browse filesBrowse files
authored
Reverse stackplot legend to match data display
This puts the legend key in the same order as the stacked data, with oceania at the top (near invisible), then europe, ..., with africa at the bottom.
1 parent 8293774 commit 602a0ff
Copy full SHA for 602a0ff

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+1
-1
lines changed

‎galleries/examples/lines_bars_and_markers/stackplot_demo.py

Copy file name to clipboardExpand all lines: galleries/examples/lines_bars_and_markers/stackplot_demo.py
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.