why matplotlib give the error [<matplotlib.lines.Line2D object at 0x0392A9D0>]?
Question: I am using python 2.7.9 on win8. When I tried to plot using matplotlib, the
following error showed up:

> from pylab import *  
>  plot([1,2,3,4])
>
> **[matplotlib.lines.Line2D object at 0x0392A9D0]**

I tried the test code "python simple_plot.py --verbose-helpful", and the
following warning showed up:

> $HOME=C:\Users\XX matplotlib data path C:\Python27\lib\site-
> packages\matplotlib\mpl-data
>
> * * *
>
> You have the following UNSUPPORTED LaTeX preamble customizations:
>
> Please do not ask for support with these customizations active.
>
> * * *
>
> loaded rc file C:\Python27\lib\site-packages\matplotlib\mpl-
> data\matplotlibrc matplotlib version 1.4.3 verbose.level helpful interactive
> is False platform is win32 CACHEDIR=C:\Users\XX.matplotlib Using fontManager
> instance from C:\Users\XX.matplotlib\fontList.cache backend TkAgg version
> 8.5 findfont: Matching :family=sans-
> serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium
> to Bitstream Vera Sans (u'C:\Python27\lib\site-packages\matplotlib\mpl-
> data\fonts\ttf\Vera.ttf') with score of 0.000000

What does this mean? How could I get matplotlib working? Thank you very much!


Answer: That isn't an error. That has created a plot object but you need to show the
window. That's done using
[`pyplot.show()`](http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.show)...
so you seriously just have to do...

    
    
    show()
    

If you don't believe me, here's a trace from IPython:

    
    
    In [9]: from pylab import *
    
    In [10]: plot([1,2,3,4])
    Out[10]: [<matplotlib.lines.Line2D at 0x123245290>]
    
    In [11]: show()
    

We get:

[![enter image description
here](http://i.stack.imgur.com/snnS0.png)](http://i.stack.imgur.com/snnS0.png)

* * *

As mentioned in the comments, you should avoid using `pylab`. You should use
`matplotlib.pyplot` instead.... so:

    
    
    import matplotlib.pyplot as plt
    plt.plot([1,2,3,4])
    plt.show()
    

