title: FixedFormatter_shoul_only_be_used_together_with_FixedLocator: How to deal with this warning in matplotlib?
body: <p>I have a simple bar chart with a line chart over it.</p>
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  x = np.array([&quot;one&quot;, &quot;two&quot;, &quot;three&quot;, &quot;four&quot;])
  a = np.array([1, 2, 3, 4])
  b = np.array([2, 4, 3, 1])
  
  fig, ax1 = plt.subplots()
  
  ax2 = ax1.twinx()
  ax1.bar(x, a, color=&quot;g&quot;)
  ax2.plot(x, b, color=&quot;r&quot;)
  
  # Problem is here.
  ax1.set_xticklabels(x, rotation=&quot;vertical&quot;, size=12)
  
  plt.show()
  </code></pre>
  <p>When I run it, it works fine. But I get this warning:</p>
  <pre><code>&quot;&quot;&quot;
  &lt;ipython-input-65-9b40369b760b&gt;:15: UserWarning: FixedFormatter should only be used together with 
  FixedLocator
    ax1.set_xticklabels(x, rotation=&quot;vertical&quot;, size=12)
  &quot;&quot;&quot;
  </code></pre>
  <p>All I need to know is how to avoid this warning.</p>