SourceForge logo
SourceForge logo
Menu

matplotlib-checkins

Revision: 3893
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3893&view=rev
Author: mdboom
Date: 2007年09月26日 05:29:05 -0700 (2007年9月26日)
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.
Revision: 4161
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4161&view=rev
Author: mdboom
Date: 2007年11月08日 08:26:31 -0800 (2007年11月08日)
Log Message:
-----------
Updating the simple_plot_fps benchmark.
Modified Paths:
--------------
 branches/transforms/examples/simple_plot_fps.py
Modified: branches/transforms/examples/simple_plot_fps.py
===================================================================
--- branches/transforms/examples/simple_plot_fps.py	2007年11月08日 14:31:15 UTC (rev 4160)
+++ branches/transforms/examples/simple_plot_fps.py	2007年11月08日 16:26:31 UTC (rev 4161)
@@ -5,8 +5,7 @@
 """
 from pylab import *
 
-plot([1,2])
-show()
+ion()
 
 t = arange(0.0, 1.0+0.001, 0.001)
 s = cos(2*2*pi*t)
@@ -21,14 +20,10 @@
 #savefig('simple_plot')
 
 import time
-from matplotlib import transforms
- 
+
 frames = 100.0
-t = time.clock()
-ion()
+t = time.time()
 for i in xrange(int(frames)):
- transforms.CATCH = True
 part = i / frames
 axis([0.0, 1.0 - part, -1.0 + part, 1.0 - part])
- show()
-print "fps:", frames / (time.clock() - t)
+print "fps:", frames / (time.time() - t)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4307
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4307&view=rev
Author: mdboom
Date: 2007年11月15日 08:29:40 -0800 (2007年11月15日)
Log Message:
-----------
Updated benchmark
Modified Paths:
--------------
 branches/transforms/examples/simple_plot_fps.py
Modified: branches/transforms/examples/simple_plot_fps.py
===================================================================
--- branches/transforms/examples/simple_plot_fps.py	2007年11月15日 16:28:54 UTC (rev 4306)
+++ branches/transforms/examples/simple_plot_fps.py	2007年11月15日 16:29:40 UTC (rev 4307)
@@ -23,7 +23,12 @@
 
 frames = 100.0
 t = time.time()
+c = time.clock()
 for i in xrange(int(frames)):
 part = i / frames
 axis([0.0, 1.0 - part, -1.0 + part, 1.0 - part])
-print "fps:", frames / (time.time() - t)
+wallclock = time.time() - t
+user = time.clock() - c
+print "wallclock:", wallclock
+print "user:", user
+print "fps:", frames / wallclock
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /