title: PLT Latex with variables
body: <p>I'm trying to create a function in python which creates plot x^a. I want to have title LaTex x^a, where a takes the passed value. I have the following for the function which creates x^2 plot:</p>
  <pre><code>a = r'{x^2}'
  ax = fig.add_subplot(111)
  ax.set_title(f&quot;ƒ(x)= {'$%s$' %a}&quot;)
  </code></pre>
  <p>but I have no idea how I can implement to it .format(a) so that value of a becomes a degree of x in LaTex plot title.</p>