title: Matplotlib: unspecified ticklabels appear after manually setting them
body: <p>I am currently using python 3.8.3 with matplotlib 3.2.2. I want to automatically set the y-ticklabels of my plot after log transforming them. So I have written a small list comprehension that automatically generates the y-ticks, which I set simultaneously as location and label.</p>
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  import math
  
  x = np.array([0.00512861, 0.06456542, 0.0042658, 0.00389045, 0.01995262,
                0.01737801, 0.02041738, 0.15848932, 0.0162181, 0.03388442,
                0.14454398, 0.01258925, 0.00549541, 0.0057544, 0.00776247,
                0.09549926, 0.14791084, 0.04897788])
  y = np.array([1.12201845, 1.12201845, 1.28824955, 2.23872114, 0.57543994,
                1.31825674, 1.9498446, 1.12201845, 2.29086765, 1.12201845,
                1.86208714, 1.17489755, 1.20226443, 2.95120923, 1.23026877,
                3.63078055, 0.72443596, 1.99526231])
  
  fig, ax = plt.subplots(1, 1)
  ax.plot(x, y, &quot;ko&quot;)
  
  ax.set_yscale(&quot;log&quot;)
  
  bottom, top = ax.get_ylim()
  
  yticks = [round(bottom, 1) * 2 ** i for i in range(100)
            if round(bottom, 1) * 2 ** i &lt;= math.ceil(top)]
  
  ax.set_yticks(yticks)
  ax.set_yticklabels(yticks)
  plt.show()
  </code></pre>
  <p>If i execute the code seen above, the y-ticklabel list looks like this:</p>
  <pre><code>[0.5, 1.0, 2.0, 4.0]
  </code></pre>
  <p>Which is as I expected it to be, but in my plot two additional y-ticklabel appear:
  picture of plot with additional ticklabels</p>
  <p><a href="https://i.stack.imgur.com/1Mrax.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1Mrax.png" alt="picture of plot with additional ticklabels" /></a></p>
  <p>They do not appear if I use different datapoints (here for example, y data is squared, X data is the same, and tick labels are exactly as the code set them to be):</p>
  <p>picture of plot without additional ticklabels</p>
  <p><a href="https://i.stack.imgur.com/tVSX3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tVSX3.png" alt="picture of plot without additional ticklabels" /></a></p>
  <p>Does anybody know why they appear using the original dataset and not when the y data is squared?
  Thanks in advance for your time and help in this matter!</p>