Changing color of bar plot if value is less than zero and fill white space
问题 I have created a DataFrame: df.tail(20) Speed 130 -0.000272 131 -0.000219 132 -0.000178 133 -0.000234 134 -0.000261 135 -0.000281 136 -0.000244 137 -0.000255 138 -0.000290 139 -0.000210 140 -0.000216 141 -0.000209 142 -0.000139 143 -0.000060 144 0.000007 145 0.000043 146 0.000068 147 0.000093 148 -0.000025 149 -0.000005 I am using a barchart to draw barplot: ind = np.arange(len(df)) ax.bar(ind, df['Speed'], width=0.5, color="r") What I am trying to do is changing bar colors to red if values