title: How to horizontally shift a histogram in Python?
body: <p>I have a 1D array of numbers from which I need to plot a histogram in Python3. The bin boundaries are also available with me:</p>
  
  <pre><code>bins = [1,2,3,4,5]
  plt.hist(data, bins=bins, histtype='step')
  </code></pre>
  
  <p>Now, if I want to shift the histogram horizontally by 1 unit on the x-axis, how can I achieve that? I don't want the shape or the bin boundaries to change, I just want the whole histogram to move on the x-axis. If the histogram can be represented as f(x), I am looking for f(x-x0).</p>