title: Change x-axis ticks to custom strings
body: <p>I want to change the x-axis ticklabels to custom strings, but the following does not work. How can I set the ticklabels to <code>[&quot;one&quot;, &quot;two&quot;, &quot;three&quot;]</code>?</p>
  <pre><code>from PyQt5.QtWidgets import *
  from PyQt5.QtGui import *
  import matplotlib.pyplot as plt
  
  def pushButtonClicked(self):
          code = self.lineEdit.text()
         
         
          x=[&quot;one&quot;,&quot;two&quot;,&quot;three&quot;]
          l=[1,2,3]
          y=[2,3,4]
          ax = self.fig.add_subplot(111)
         
          print(1)
          
          ax.plot(l, y, label='DeadPopulation')
          ax.xticks(l,x)
          print(IntroUI.g_sortArrayDeadcnt)
        
          ax.legend(loc='upper right') 
          ax.grid() 
          self.canvas.draw()
  </code></pre>