title: Break // in x axis of matplotlib
body: <p>Best way to describe what I want to achieve is using my own image:</p>
  
  <p><a href="https://i.stack.imgur.com/REeKv.png" rel="noreferrer"><img src="https://i.stack.imgur.com/REeKv.png" alt="enter image description here"></a></p>
  
  <p>Now I have a lot of dead space in the spectra plot, especially between 5200 and 6300. My question is quite simple, how would I add in a nice little // break that looks something similar to this (image lifted from the net):</p>
  
  <p><a href="https://i.stack.imgur.com/f9aD2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/f9aD2.png" alt="enter image description here"></a></p>
  
  <p>I'm using this setup for my plots:</p>
  
  <pre><code>nullfmt = pyplot.NullFormatter()
  
  fig = pyplot.figure(figsize=(16,6))
  
  gridspec_layout1= gridspec.GridSpec(2,1)
  gridspec_layout1.update(left=0.05, right=0.97, hspace=0, wspace=0.018)
  pyplot_top      = fig.add_subplot(gridspec_layout1[0])
  pyplot_bottom   = fig.add_subplot(gridspec_layout1[1])
  
  pyplot_top.xaxis.set_major_formatter(nullfmt)
  </code></pre>
  
  <p>I'm quite certain it is achievable with gridpsec but an advanced tutorial cover exactly how this is achieved would be greatly appreciated.</p>
  
  <p>Apologies also if this question has been dealt with previously on stackoverflow but I have looked extensively for the correct procedure for <code>gridSpec</code> but found nothing as yet.</p>
  
  <p>I have managed to go as far as this, pretty much there:</p>
  
  <p><a href="https://i.stack.imgur.com/5XXMY.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5XXMY.png" alt="enter image description here"></a></p>
  
  <p>However, my break lines are not as steep as I would like them...how do I change them? (I have made use of the example answer below)</p>