From: <md...@us...> - 2007-09-26 12:29:17
|
Revision: 3893 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3893&view=rev Author: mdboom Date: 2007-09-26 05:29:05 -0700 (Wed, 26 Sep 2007) Log Message: ----------- Committing simple_ploy_fps.py Added Paths: ----------- branches/transforms/examples/simple_plot_fps.py Added: branches/transforms/examples/simple_plot_fps.py =================================================================== --- branches/transforms/examples/simple_plot_fps.py (rev 0) +++ branches/transforms/examples/simple_plot_fps.py 2007-09-26 12:29:05 UTC (rev 3893) @@ -0,0 +1,32 @@ +#!/usr/bin/env python +""" +Example: simple line plot. +Show how to make and save a simple line plot with labels, title and grid +""" +from pylab import * + +plot([1,2]) +show() + +t = arange(0.0, 1.0+0.001, 0.001) +s = cos(2*2*pi*t) +plot(t, s, '-', lw=2) + +xlabel('time (s)') +ylabel('voltage (mV)') +title('About as simple as it gets, folks') +grid(True) + +#savefig('simple_plot.png') +#savefig('simple_plot') + +import time + +frames = 100.0 +t = time.clock() +ion() +for i in xrange(int(frames)): + part = i / frames + axis([0.0, 1.0 - part, -1.0 + part, 1.0 - part]) + show() +print "fps:", frames / (time.clock() - t) Property changes on: branches/transforms/examples/simple_plot_fps.py ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |