|
From: <ai...@us...> - 2009-11-29 07:51:35
|
Revision: 10645
http://plplot.svn.sourceforge.net/plplot/?rev=10645&view=rev
Author: airwin
Date: 2009-11-29 07:51:23 +0000 (Sun, 29 Nov 2009)
Log Message:
-----------
Add simple script to test plgradient functionality.
Modified Paths:
--------------
trunk/examples/python/CMakeLists.txt
Added Paths:
-----------
trunk/examples/python/test_gradient.py
Modified: trunk/examples/python/CMakeLists.txt
===================================================================
--- trunk/examples/python/CMakeLists.txt 2009-11-29 07:50:29 UTC (rev 10644)
+++ trunk/examples/python/CMakeLists.txt 2009-11-29 07:51:23 UTC (rev 10645)
@@ -83,6 +83,7 @@
test_superscript_subscript.py
test_plplot_encodings.py
test_fill.py
+ test_gradient.py
)
if(ENABLE_tk)
Added: trunk/examples/python/test_gradient.py
===================================================================
--- trunk/examples/python/test_gradient.py (rev 0)
+++ trunk/examples/python/test_gradient.py 2009-11-29 07:51:23 UTC (rev 10645)
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+# Simple test of plgradient for a complicated polygon.
+
+# Append to effective python path so that can find plplot modules.
+from plplot_python_start import *
+
+import sys
+from plplot import *
+from numpy import *
+from math import *
+
+# Parse and process command line arguments
+plparseopts(sys.argv, PL_PARSE_FULL)
+
+xmin,xmax,ymin,ymax = (0., 1., 0., 1.)
+x = (0., 0.2, 1., 0.3)
+y = (0., 1., 0.2, 0.6)
+#x = (0., 0., 1., 1.)
+#y = (0., 1., 1., 0.)
+# Initialize plplot
+plinit()
+for i in range(1):
+ plcol0(2)
+ pladv(0)
+ plvpor(0.1, 0.9, 0.1, 0.9)
+ plwind(xmin, xmax, ymin, ymax)
+# Just to show edges of viewport
+ plbox("bc", 0., 0, "bc", 0., 0)
+ plcol0(1)
+ plgradient(x,y, 45. + i)
+plend()
Property changes on: trunk/examples/python/test_gradient.py
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|