title: LaTeX is not able to process the string in python
body: <p>Trying to graph a weibull distribution in python3 using the code available at (<a href="http://www.astroml.org/book_figures/chapter3/fig_weibull_distribution.html" rel="nofollow noreferrer">http://www.astroml.org/book_figures/chapter3/fig_weibull_distribution.html</a>)</p>
  
  <pre><code># Author: Jake VanderPlas
  # License: BSD
  #   The figure produced by this code is published in the textbook
  #   "Statistics, Data Mining, and Machine Learning in Astronomy" (2013)
  #   For more information, see http://astroML.github.com
  #   To report a bug or issue, use the following forum:
  #    https://groups.google.com/forum/#!forum/astroml-general
  import numpy as np
  from scipy.stats import dweibull
  from matplotlib import pyplot as plt
  
  #----------------------------------------------------------------------
  # This function adjusts matplotlib settings for a uniform feel in the textbook.
  # Note that with usetex=True, fonts are rendered with LaTeX.  This may
  # result in an error if LaTeX is not installed on your system.  In that case,
  # you can set usetex to False.
  from astroML.plotting import setup_text_plots
  setup_text_plots(fontsize=8, usetex=True)
  
  #------------------------------------------------------------
  # Define the distribution parameters to be plotted
  k_values = [0.5, 1, 2, 2]
  lam_values = [1, 1, 1, 2]
  linestyles = ['-', '--', ':', '-.', '--']
  mu = 0
  x = np.linspace(-10, 10, 1000)
  
  #------------------------------------------------------------
  # plot the distributions
  fig, ax = plt.subplots(figsize=(5, 3.75))
  
  for (k, lam, ls) in zip(k_values, lam_values, linestyles):
      dist = dweibull(k, mu, lam)
      plt.plot(x, dist.pdf(x), ls=ls, c='black',
               label=r'$k=%.1f,\ \lambda=%i$' % (k, lam))
  
  plt.xlim(0, 5)
  plt.ylim(0, 0.6)
  
  plt.xlabel('$x$')
  plt.ylabel(r'$p(x|k,\lambda)$')
  plt.title('Weibull Distribution')
  
  plt.legend()
  plt.show()
  </code></pre>
  
  <p>I keet getting the following error:</p>
  
  <pre><code>RuntimeError: LaTeX was not able to process the following string:
  b'lp'
  Here is the full report generated by LaTeX: 
  
  
  
  &lt;matplotlib.figure.Figure at 0x22c11c7a2e8&gt;
  </code></pre>
  
  <p>I cant figure out where is "b'lp'".</p>