|
From: <ai...@us...> - 2010-09-11 23:20:37
|
Revision: 11170
http://plplot.svn.sourceforge.net/plplot/?rev=11170&view=rev
Author: airwin
Date: 2010-09-11 23:20:31 +0000 (Sat, 11 Sep 2010)
Log Message:
-----------
Add on some asterisk alignment tests.
Modified Paths:
--------------
trunk/examples/python/test_circle.py
Modified: trunk/examples/python/test_circle.py
===================================================================
--- trunk/examples/python/test_circle.py 2010-09-11 18:57:54 UTC (rev 11169)
+++ trunk/examples/python/test_circle.py 2010-09-11 23:20:31 UTC (rev 11170)
@@ -7,42 +7,50 @@
from plplot import *
from numpy import *
+x = [0.5]
+y = [0.5]
+ifunicode = True
+
# Parse and process command line arguments
plparseopts(sys.argv, PL_PARSE_FULL)
# Initialize plplot
plinit()
plcol0(2)
-pladv(0)
-plvpor(0.1, 0.9, 0.1, 0.9)
-plwind(0., 1., 0., 1.)
-# Just to show edges of viewport
-plbox("bc", 0., 0, "bc", 0., 0)
-x = [0.5]
-y = [0.5]
-ifplptex = True
-ifunicode = True
-
-k=0
-for size in 2.**arange(2,-3,-1):
- k+=1
- plcol0(k)
- if ifplptex:
- if ifunicode:
- plschr(0., 4.*size)
- # LARGE CIRCLE has a centre of symmetry which is about one-eighth the
- # radius below the centre of symmetry of the box for DejaVu Sans.
- plptex(0.5, 0.5, 1., 0., 0.5, "#[0x25ef]")
- # BOX DRAWINGS LIGHT DIAGONAL CROSS is one of the best centred symmetrical
- # glyphs I have found using gucharmap for DejaVu Sans.
- plptex(0.5, 0.5, 1., 0., 0.5, "#[0x2573]")
- else:
- plschr(0., 4.*size)
- plptex(0.5, 0.5, 1., 0., 0.5, "#(907)")
-# plcol0(3)
-# plssym(0., size)
-# plsym(x, y, 907)
-
+for kind in range(4):
+ pladv(0)
+ plvpor(0.1, 0.9, 0.1, 0.9)
+ plwind(0., 1., 0., 1.)
+ # Just to show edges of viewport
+ plbox("bc", 0., 0, "bc", 0., 0)
+ k=0
+ for size in 2.**arange(2,-3,-1):
+ k+=1
+ plcol0(k)
+ if kind==0:
+ if ifunicode:
+ plschr(0., 4.*size)
+ # LARGE CIRCLE has a centre of symmetry which is about one-eighth the
+ # radius below the centre of symmetry of the box for DejaVu Sans.
+ plptex(0.5, 0.5, 1., 0., 0.5, "#[0x25ef]")
+ # BOX DRAWINGS LIGHT DIAGONAL CROSS is one of the best centred symmetrical
+ # glyphs I have found using gucharmap for DejaVu Sans.
+ plptex(0.5, 0.5, 1., 0., 0.5, "#[0x2573]")
+ else:
+ plschr(0., 4.*size)
+ plptex(0.5, 0.5, 1., 0., 0.5, "#(907)")
+ elif kind ==1:
+ # Print an asterisk using plptex
+ plschr(0., 8.*size)
+ plptex(0.5, 0.5, 1., 0., 0.5, "#(728)")
+ elif kind ==2:
+ # Print an asterisk using plsym
+ plssym(0., 8.*size)
+ plsym(x, y, 728)
+ elif kind ==3:
+ # Print an asterisk using plpoin
+ plssym(0., 8.*size)
+ plpoin(x, y, 3)
# Terminate plplot
plend()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|