0

Here is a preview of the corresponding bar chart:

Here is a preview of the corresponding bar chart

fig2 = plt.figure(figsize=(8,6))
ax = plt.subplot()
ax.bar(dfdin['Date'], dfdin['drop'])
plt.title("Seated Diner by Reservation", fontsize = 15)
plt.ylabel('YOY Percent Change')
ax.tick_params(axis='x',rotation=45)
plt.ylim(-100,40)

After running the code above, you get only two of the bars to show in a blue shade. I would like each to be blue and widened. Does anyone know why they are all not showing up colored and how to fix it.

BigBen
  • 46,229
  • 7
  • 24
  • 40
  • 1
    For your objectives, the `width` and `color` parameters need to be present. See this for advanced colouring: https://stackoverflow.com/questions/12236566/setting-different-color-for-each-series-in-scatter-plot-on-matplotlib?rq=1 and this: https://matplotlib.org/gallery/lines_bars_and_markers/barchart.html#sphx-glr-gallery-lines-bars-and-markers-barchart-py for manipulating how your bars look – shiv_90 Dec 08 '20 at 04:13

1 Answers1

0

You can mention the color and width as required, in the code.

Example -

ax.bar(dfdin['Date'], dfdin['drop'], color='blue', width=0.8)

enter image description here