diff --git a/examples/lines_bars_and_markers/stackplot_demo.py b/examples/lines_bars_and_markers/stackplot_demo.py index 142b3d2a0ce0..9cb499e15176 100644 --- a/examples/lines_bars_and_markers/stackplot_demo.py +++ b/examples/lines_bars_and_markers/stackplot_demo.py @@ -30,7 +30,7 @@ fig, ax = plt.subplots() ax.stackplot(year, population_by_continent.values(), labels=population_by_continent.keys(), alpha=0.8) -ax.legend(loc='upper left') +ax.legend(loc='upper left', reverse=True) ax.set_title('World population') ax.set_xlabel('Year') ax.set_ylabel('Number of people (millions)')