title: Plotting multiple bars with matplotlib using ax.bar()
body: <p>Following up my previous question: <a href="https://stackoverflow.com/questions/56041988/sorting-datetime-objects-by-hour-to-a-pandas-dataframe-then-visualize-to-histog">Sorting datetime objects by hour to a pandas dataframe then visualize to histogram</a></p>
  
  <p>I need to plot 3 bars for one X-axis value representing viewer counts. Now they show those under one minute and above. I need one showing the overall viewers. I have the Dataframe but I can't seem to make them look right. With just 2 bars I have no problem, it looks just like I would want it with two bars:
  <a href="https://i.stack.imgur.com/Ecvfn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Ecvfn.png" alt="I need to plot 3 bars for one X-axis value representing viewer counts."></a></p>
  
  <p>The relevant part of the code for this:</p>
  
  <pre class="lang-py prettyprint-override"><code># Time and date stamp variables
  allviews = int(df['time'].dt.hour.count())
  date = str(df['date'][0].date())
  hours = df_hist_short.index.tolist()
  hours[:] = [str(x) + ':00' for x in hours]
  </code></pre>
  
  <p>The hours variable that I use to represent the X-axis may be problematic, since I convert it to string so I can make the hours look like <code>23:00</code> instead of just the pandas index output <code>23</code> etc. I have seen examples where people add or subtract values from the X to change the bars position.</p>
  
  <pre class="lang-py prettyprint-override"><code>fig, ax = plt.subplots(figsize=(20, 5))
  short_viewers = ax.bar(hours, df_hist_short['time'], width=-0.35, align='edge')
  long_viewers = ax.bar(hours, df_hist_long['time'], width=0.35, align='edge')
  </code></pre>
  
  <p>Now I set the <code>align='edge'</code> and the two width values are absolutes and negatives. But I have no idea how to make it look right with 3 bars. I didn't find any positioning arguments for the bars. Also I have tried to work with the plt.hist() but I couldn't get the same output as with the plt.bar() function.</p>
  
  <p>So as a result I wish to have a 3rd bar on the graph shown above on the left side, a bit wider than the other two.</p>