title: Matplotlib Ticker
body: <p>Can someone give me an example of how to use the following tickFormatters. The <a href="https://matplotlib.org/api/ticker_api.html" rel="nofollow noreferrer">docs</a> are uninformative to me.</p>
  
  <p><code>ticker.StrMethodFormatter()
   ticker.IndexFormatter()</code></p>
  
  <p>for example I might think that </p>
  
  <pre><code>x = np.array([ 316566.962,  294789.545,  490032.382,  681004.044,  753757.024,
              385283.153,  651498.538,  937628.225,  199561.358,  601465.455])
  y = np.array([ 208.075,  262.099,  550.066,  633.525,  612.804,  884.785,
              862.219,  349.805,  279.964,  500.612])
  money_formatter = tkr.StrMethodFormatter('${:,}')
  
  plt.scatter(x,y)
  ax = plt.gca()
  fmtr = ticker.StrMethodFormatter('${:,}')
  ax.xaxis.set_major_formatter(fmtr)
  </code></pre>
  
  <p>would set my tick labels to be dollar signed and comma sep for thousands places ala</p>
  
  <pre><code>['$300,000', '$400,000', '$500,000', '$600,000', '$700,000', '$800,000', '$900,000']
  </code></pre>
  
  <p>but instead I get an index error.</p>
  
  <pre><code>IndexError: tuple index out of range
  </code></pre>
  
  <p>For <code>IndexFormatter</code> docs say:</p>
  
  <blockquote>
    <p>Set the strings from a list of labels</p>
  </blockquote>
  
  <p>don't really know what this means and when I try to use it my tics disappear. </p>