title: Matplotlib increase spacing between points on x-axis
body: <p>I'm looking for a way to prevent labels from overlapping. While searching through Stackoverflow I couldn't even find any suggestion on how to control x-axis spacing.</p>
  
  <p><a href="https://i.stack.imgur.com/N29UP.png" rel="noreferrer"><img src="https://i.stack.imgur.com/N29UP.png" alt="enter image description here"></a></p>
  
  <pre><code>        matplotlib.pyplot.xticks(x, xticks, rotation=90)
          matplotlib.pyplot.plot(x, y)
          matplotlib.pyplot.bar(x, y, alpha=0.2)
  
          matplotlib.pyplot.title(
              f"średnia cena produktu {self.identifier}, według kontrahentów")
          matplotlib.pyplot.xlabel("kontrahent")
          matplotlib.pyplot.ylabel("cena")
  
  
          matplotlib.pyplot.tight_layout()
  
          matplotlib.pyplot.savefig(os.path.join(
              "products", self.identifier, "wykres.png"))
          matplotlib.pyplot.close()
  </code></pre>