t = numpy.arange(0.0, 1.0, 0.01)
s = numpy.cos(2*2*numpy.pi*t)
z = numpy.sin(2*2*numpy.pi*t)
pylab.plot(t, s, 'ro-', t, z, 'bx-')
pylab.xlabel('time (s)')
pylab.ylabel('voltage (mV)')
pylab.title('About as simple as it gets, folks')
pylab.grid(True)
pylab.savefig('simple_plot')
pylab.legend(('sin','cos'))
pylab.show()