title: matplotlib.pyplot x-axis offset siamese network
body: <p>I want to have an x-Axis offset from around 5, since the plotted training history looks like this:</p>
  <p><a href="https://i.stack.imgur.com/2rOj4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2rOj4.png" alt="Training Loss and Accuracy" /></a></p>
  <p>The code to plot this looks like this:</p>
  <pre><code>plt.style.use(&quot;ggplot&quot;)
  plt.figure()
  plt.plot(H.history[&quot;loss&quot;], label=&quot;train_loss&quot;)
  plt.plot(H.history[&quot;val_loss&quot;], label=&quot;val_loss&quot;)
  plt.plot(H.history[&quot;accuracy&quot;], label=&quot;train_acc&quot;)
  plt.plot(H.history[&quot;val_accuracy&quot;], label=&quot;val_acc&quot;)
  plt.title(&quot;Training Loss and Accuracy&quot;)
  plt.xlabel(&quot;Epoch #&quot;)
  plt.ylabel(&quot;Loss/Accuracy&quot;)
  plt.legend(loc=&quot;lower left&quot;)
  plt.savefig(plotPath)
  </code></pre>
  <p>I would like to know how I can either create an offset at the x-axis or zoom in?</p>