Advertisement
brainuser5705

matplotlib stacking with multiple cats

Jun 23rd, 2022
1,084
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. prev = np.array(0) # bottom can accept 0
  2.     for cat in dists:
  3.         ax.bar(labels, dists[cat], label=cat, bottom=prev)
  4.         prev = prev + np.array(dists[cat])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement