Advertisement
Dodma

Untitled

Jun 12th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. cost_pivot = costs.pivot_table(index='dt', columns='source_id', values='costs', aggfunc='sum')
  2. x='dt'
  3. y1, y2, y3, y4, y5, y6, y7 =
  4. labels = ["y1", "y2", "y3", "y4", "y5", "y6", "y7"]
  5. fig, ax = plt.subplots(figsize = (10, 4))
  6. plt.stackplot(x, y1, y2, y3, y4, y5, y6, y7, alpha = 0.8, labels = labels)
  7. ax.legend(loc='upper left')
  8. plt.xticks(np.arange(min(x), max(x)+1), rotation = 90)
  9. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement