Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cost_pivot = costs.pivot_table(index='dt', columns='source_id', values='costs', aggfunc='sum')
- x='dt'
- y1, y2, y3, y4, y5, y6, y7 =
- labels = ["y1", "y2", "y3", "y4", "y5", "y6", "y7"]
- fig, ax = plt.subplots(figsize = (10, 4))
- plt.stackplot(x, y1, y2, y3, y4, y5, y6, y7, alpha = 0.8, labels = labels)
- ax.legend(loc='upper left')
- plt.xticks(np.arange(min(x), max(x)+1), rotation = 90)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement