title: Removing specific ticks from matplotlib plot
body: <p>I'm trying to remove the origin ticks from my plot below to stop them overlapping, alternatively just moving them away from each other would also be great I tried this:</p>
  
  <p><img src="https://i.stack.imgur.com/KVjAv.png" alt="enter image description here"></p>
  
  <pre><code>xticks = ax.xaxis.get_major_ticks()
  xticks[0].label1.set_visible(False)
  yticks = ax.yaxis.get_major_ticks()
  yticks[0].label1.set_visible(False)
  </code></pre>
  
  <p>However this removed the first and last ticks from the y axis like so:</p>
  
  <p><img src="https://i.stack.imgur.com/n2Miq.png" alt="enter image description here"> </p>
  
  <p>Does anyone have an idea about how to do this? Any help would be greatly appreciated.</p>
  
  <p>EDIT: Added more example code</p>
  
  <pre><code>import matplotlib
  import matplotlib.pyplot as plt
  fig = plt.figure()
  ax = fig.add_subplot(111)
  plt.xlabel(xlab)
  plt.ylabel(ylab)
  ax.spines["right"].set_color('none')
  ax.xaxis.set_ticks_position('top')
  ax.yaxis.set_ticks_position('left')
  ax.spines["bottom"].set_color('none')
  ax.xaxis.set_label_position('top')
  ax.spines['left'].set_color('black')
  ax.spines['top'].set_color('black')
  ax.tick_params(colors='black')
  xticks = ax.xaxis.get_major_ticks()
  xticks[0].label1.set_visible(False)
  yticks = ax.yaxis.get_major_ticks()
  yticks[-1].label1.set_visible(False)
  for x, y in all:
      ax.plot(x, y, 'ro')
  </code></pre>