Scatterplot in matplotlib : <p>I am trying to plot strings vs integers using matplotlib scatterplot. </p>

<p>My dataset looks like this:</p>

<pre><code>      Name               Utilisation
      manhit                  10
      movers                  9
      mayer                 9
      fabcom                8
      freshimp              7
</code></pre>

<p>I tried with the following code (referred from one of the previous posts) but for some reason it does not work:</p>

<pre><code>    import matplotlib.pyplot as plt
    from matplotlib.ticker import FuncFormatter, MultipleLocator
    import numpy as np

    x_data = np.array(dftail.Utilisation)
    print x_data
    y_data = np.array(dftail.Name)
    print y_data

    def ord_to_char(v, p=None):
        return chr(int(v))

    fig, ax = plt.subplots()
    ax.plot(x_data, y_data, 'x')
    ax.xaxis.set_major_formatter(FuncFormatter(ord_to_char))
    ax.xaxis.set_major_locator(MultipleLocator(1))
    plt.show()
</code></pre>

<p>I would appreciate any advice. Thanks very much.</p>
