I’ve the next dataframe:
key1 key2 key3 ... time Jan 0.5 0.4 0.2 ... Feb 0.3 0.4 0.4 ... Mar 0.2 0.4 0.1 ... Apr 0.5 0.3 0.8 ... ... ... ... ...
I created a bar chart plot as follows:
import matplotlib.pyplot as plt ax = df10.plot(type='bar', figsize=(15, 10), fontsize=12, stacked='true') plt.present()
This offers me a stacked bar chart with many bars and lots of colours, which doesn’t present an excellent overview at first look.
I thus need to spotlight solely these bars that make an influence (>0.5) and conceal the unimportant ones (by coloring them gray).
The purpose is due to this fact some conditional coloring: bars, whose values are beneath 0.5 must be coloured in gray, the remaining ought to obtain predefined colours.
I attempted so some ways and cant discover a resolution that works. I’m fairly new to python/matplotlib.
Can anybody assist me please? Thanks very a lot upfront, any assist is very appreciated!