.. _pylab_examples-simple_plot:

pylab_examples example code: simple_plot.py
===========================================



.. plot:: /build/matplotlib-ntJFVk/matplotlib-1.3.1/doc/mpl_examples/pylab_examples/simple_plot.py

::

    from pylab import *
    
    t = arange(0.0, 2.0, 0.01)
    s = sin(2*pi*t)
    plot(t, s)
    
    xlabel('time (s)')
    ylabel('voltage (mV)')
    title('About as simple as it gets, folks')
    grid(True)
    savefig("test.png")
    show()
    

Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)