title: set constant width to every bar in a bar plot
body: <p>I am trying to plot a bar plot where each bin has a difference length and as a result I end up with a very ugly result.c:) What I would like to do is still be able to define a bin of deference lengths but all the bars be plotted the same fixed width. How can I do that? Here is what I have done so far:</p>
  
  <pre><code>%matplotlib inline
  
  import numpy as np
  import matplotlib.pyplot as plt
  import seaborn as sns
  
  sns.set_palette("deep", desat=.6)
  sns.set_context(rc={"figure.figsize": (8, 4)})
  np.random.seed(9221999)
  
  data = [0,2,30,40,50,10,50,40,150,70,150,10,3,70,70,90,10,2] 
  bins = [0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100,200]
  plt.hist(data, bins=bins);
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/BglmJ.png" alt="enter image description here"></p>
  
  <p><strong>EDIT</strong></p>
  
  <p>This question has been marked as duplicate but in fact non of the proposed links solved my problem; the 1st is a very crappy workaround and the 2nd doesn't solve the problem at all as it sets all bars' width to a certain number.</p>