1

for now, my Stacked Bar Chart using Matplotlib look like this.

plt.bar(x, bar1, color='red')
plt.bar(x, bar2, color='darkorange', bottom=bar1)
plt.bar(x, bar3, color='limegreen', bottom=list(map(lambda x, y,: x + y, bar1, bar2)))
plt.bar(x, bar4, color='slateblue', bottom=list(map(lambda x, y, z: x + y + z, bar1, bar2, bar3)))

My Graph

Is it possible to make it look a little better with kind of small gradient effect,Something like this(below). what I found so far are very complicated functions which are not intuitive, also importing the module Colours doesnt seem to work with matplotlib according to what I read so far.

from Colours import Color  # not working with matplotlib

cool graph

I checked your answers and links, these are all more or less huge colors, very flashy, I would just like to get 1 by 1 color but a bit gradient looking better than my elementary school colors. As shown in example below, where I get a stacked bar graph with 4 colors but the colors get a tiny gradient effect, more beautiful for the eye. What i saw in the answers is only 1 single bar with huge colors or going from one color to another. Which makes it impossible to use for a stacked bar graph. (to me at least!) Thx all.

DarkWarrior
  • 114
  • 1
  • 11
  • Does this answer your question? [Gradient facecolor matplotlib bar plot](https://stackoverflow.com/questions/5296335/gradient-facecolor-matplotlib-bar-plot) – cmosig May 18 '20 at 19:58
  • @cmosig that seems to be a different thing, as commented in the accepted answer. – Quang Hoang May 18 '20 at 20:13
  • https://matplotlib.org/3.1.3/gallery/lines_bars_and_markers/gradient_bar.html ? – cmosig May 18 '20 at 21:05
  • There is also this post: [how-to-fill-matplotlib-bars-with-a-gradient](https://stackoverflow.com/questions/38830250/how-to-fill-matplotlib-bars-with-a-gradient) – JohanC May 18 '20 at 21:20

0 Answers0