title: How to change width in matplotlib barh plot
body: <p>I'll have only one record in my 1st List and count of that record in my 2nd List. I need to put them in a horizontal bar graph.
  Value of List 1 in Y axis and value of List 2 as a label of the bar.
  The below code is giving me the bar whose width I can't change. How I can change the width? It's looking awkward with this large width.
  If not in matplotlib, can i use some other python library to achieve this?</p>
  <pre><code>import os
  import cx_Oracle
  import matplotlib.pyplot as plt
  
  r_c = [Sales_report_2020]
  a_i =  [1311]
  
   
  # Figure Size
  fig, ax = plt.subplots(figsize =(12, 8))
  #replace the None with integer 0
  b = [0 if x is None else x for x in a_i]
  print(b)
   
  # Horizontal Bar Plot
  plt.barh(r_c,b,height=0.5)
  plt.ylim(-0.5, len(b) - 0.5)
  ax.tick_params(width=0.5,length=6)
   
  
   
  # Add annotation to bars
  for i in ax.patches:
      plt.text(i.get_width()+0.2, i.get_y()+0.27,
              &quot;{:1.0f}&quot;.format(i.get_width()),
               fontsize = 10, fontweight ='bold',
               color ='grey') #str(round((i.get_width()), 2))
   
  # Add Plot Title
  ax.set_title('DTP!',
               loc ='center', )
   
  # Add Text watermark
  fig.text(0.9, 0.15, 'STPREPORT', fontsize = 12,
           color ='grey', ha ='right', va ='bottom',
           alpha = 0.7)
   
   
  path = r&quot;\\ssd.COM\View\Folder_Redirect\id\Documents\Conda_Envs&quot;
   
  os.chdir(path)
  plt.savefig(path + '\BAR.png')
   
  # Show Plot
  plt.show()
  conn.close()
  </code></pre>
  <p><a href="https://i.stack.imgur.com/hZl08.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hZl08.png" alt="enter image description here" /></a></p>