#251 Stacked area chart with seaborn style






The graph #250 describes how to realise a stacked area chart with matplotlib. As usual, you can benefit the seaborn style just by loading the library at the beginning of your code:







# library
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

# Data
y=[ [1,4,6,8,9], [2,2,7,10,12], [2,8,5,10,6] ]

# Plot
plt.stackplot(x,y, labels=['A','B','C'])
plt.legend(loc='upper left')

Leave a Reply

Your email address will not be published.