From: <ai...@us...> - 2009-03-20 23:53:28
|
Revision: 9762 http://plplot.svn.sourceforge.net/plplot/?rev=9762&view=rev Author: airwin Date: 2009-03-20 23:53:25 +0000 (Fri, 20 Mar 2009) Log Message: ----------- Initial commit of test script to check on centring of unicode glyphs for a circle and a cross for a wide variety of character sizes. Added Paths: ----------- trunk/examples/python/test_circle.py Added: trunk/examples/python/test_circle.py =================================================================== --- trunk/examples/python/test_circle.py (rev 0) +++ trunk/examples/python/test_circle.py 2009-03-20 23:53:25 UTC (rev 9762) @@ -0,0 +1,48 @@ +#!/usr/bin/env python + +# Append to effective python path so that can find plplot modules. +from plplot_python_start import * + +import sys +from plplot import * +from numpy import * + +# 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) + +# Terminate plplot +plend() + Property changes on: trunk/examples/python/test_circle.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. |
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. |
From: <ai...@us...> - 2010-09-12 00:17:13
|
Revision: 11171 http://plplot.svn.sourceforge.net/plplot/?rev=11171&view=rev Author: airwin Date: 2010-09-12 00:17:06 +0000 (Sun, 12 Sep 2010) Log Message: ----------- Titles for each of the pages and implement more asterisk variations. Modified Paths: -------------- trunk/examples/python/test_circle.py Modified: trunk/examples/python/test_circle.py =================================================================== --- trunk/examples/python/test_circle.py 2010-09-11 23:20:31 UTC (rev 11170) +++ trunk/examples/python/test_circle.py 2010-09-12 00:17:06 UTC (rev 11171) @@ -9,6 +9,15 @@ x = [0.5] y = [0.5] +title = [ + "Large Circle + Light Diagonal Cross with plptex", + "Ascii Asterisk with plptex", + "Plplot Encoded Unicode Indexed Asterisk with plptex", + "Plplot Encoded Hershey Indexed Asterisk with plptex", + "Asterisk with plsym", + "Asterisk with plpoin", +] + ifunicode = True # Parse and process command line arguments @@ -16,13 +25,16 @@ # Initialize plplot plinit() -plcol0(2) -for kind in range(4): +for kind in range(6): pladv(0) plvpor(0.1, 0.9, 0.1, 0.9) plwind(0., 1., 0., 1.) # Just to show edges of viewport + plcol0(1) plbox("bc", 0., 0, "bc", 0., 0) + plcol0(2) + plschr(0., 1.) + plmtex("t", 1., 0.5, 0.5, title[kind]) k=0 for size in 2.**arange(2,-3,-1): k+=1 @@ -40,14 +52,22 @@ plschr(0., 4.*size) plptex(0.5, 0.5, 1., 0., 0.5, "#(907)") elif kind ==1: - # Print an asterisk using plptex + # Print an ascii asterisk using plptex plschr(0., 8.*size) + plptex(0.5, 0.5, 1., 0., 0.5, "*") + elif kind ==2: + # Print a (PLplot encoded) unicode indexed asterisk using plptex + plschr(0., 8.*size) + plptex(0.5, 0.5, 1., 0., 0.5, "#[0x002a]") + elif kind ==3: + # Print a (PLplot encoded) Hershey indexed asterisk using plptex + plschr(0., 8.*size) plptex(0.5, 0.5, 1., 0., 0.5, "#(728)") - elif kind ==2: + elif kind ==4: # Print an asterisk using plsym plssym(0., 8.*size) plsym(x, y, 728) - elif kind ==3: + elif kind ==5: # Print an asterisk using plpoin plssym(0., 8.*size) plpoin(x, y, 3) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2012-01-21 05:11:28
|
Revision: 12140 http://plplot.svn.sourceforge.net/plplot/?rev=12140&view=rev Author: airwin Date: 2012-01-21 05:11:21 +0000 (Sat, 21 Jan 2012) Log Message: ----------- Add plstring to the list of ways to render an asterisk. Modified Paths: -------------- trunk/examples/python/test_circle.py Modified: trunk/examples/python/test_circle.py =================================================================== --- trunk/examples/python/test_circle.py 2012-01-21 01:10:10 UTC (rev 12139) +++ trunk/examples/python/test_circle.py 2012-01-21 05:11:21 UTC (rev 12140) @@ -16,6 +16,7 @@ "Plplot Encoded Hershey Indexed Asterisk with plptex", "Asterisk with plsym", "Asterisk with plpoin", + "Plplot Encoded Hershey Indexed Asterisk with plstring", ] ifunicode = True @@ -25,7 +26,7 @@ # Initialize plplot plinit() -for kind in range(6): +for kind in range(7): pladv(0) plvpor(0.1, 0.9, 0.1, 0.9) plwind(0., 1., 0., 1.) @@ -71,6 +72,10 @@ # Print an asterisk using plpoin plssym(0., 8.*size) plpoin(x, y, 3) + elif kind ==6: + # Print a (PLplot encoded) Hershey indexed asterisk using plstring + plschr(0., 8.*size) + plstring(x, y, "#(728)") # Terminate plplot plend() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-04-01 20:04:51
|
Revision: 13092 http://sourceforge.net/p/plplot/code/13092 Author: airwin Date: 2014-04-01 20:04:46 +0000 (Tue, 01 Apr 2014) Log Message: ----------- Rewrite this important test case demonstrating the vertical offset of glyphs using many more UTF-8 glyphs. Modified Paths: -------------- trunk/examples/python/test_circle.py Modified: trunk/examples/python/test_circle.py =================================================================== --- trunk/examples/python/test_circle.py 2014-04-01 19:53:12 UTC (rev 13091) +++ trunk/examples/python/test_circle.py 2014-04-01 20:04:46 UTC (rev 13092) @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8; -*- # Append to effective python path so that can find plplot modules. from plplot_python_start import * @@ -9,16 +10,31 @@ x = [0.5] y = [0.5] + title = [ "Large Circle + Light Diagonal Cross with plptex", - "Ascii Asterisk with plptex", - "Plplot Encoded Unicode Indexed Asterisk with plptex", - "Plplot Encoded Hershey Indexed Asterisk with plptex", - "Asterisk with plsym", - "Asterisk with plpoin", - "Plplot Encoded Hershey Indexed Asterisk with plstring", + "UTF-8 plus", + "UTF-8 squared plus", + "UTF-8 heavy plus", + "UTF-8 minus", + "UTF-8 squared minus", + "UTF-8 heavy minus", + "UTF-8 times", + "UTF-8 squared times", + "UTF-8 heavy multiplication x", + "UTF-8 number sign", + "UTF-8 full-width number sign", + "UTF-8 asterisk", + "UTF-8 four teardrop-spoked asterisk", + "UTF-8 8-spoked asterisk", + "UTF-8 asterisk operator", + "UTF-8 Asterisk operator with plptex", + "Plplot Encoded Unicode Indexed Asterisk operator with plptex", + "Plplot Encoded Hershey Indexed Asterisk operator with plptex", + "Hershey Asterisk operator with plsym", + "Hershey Asterisk operator with plpoin", + "Plplot Encoded Hershey Indexed Asterisk operator with plstring", ] - ifunicode = True # Parse and process command line arguments @@ -26,7 +42,7 @@ # Initialize plplot plinit() -for kind in range(7): +for kind in range(len(title)): pladv(0) plvpor(0.1, 0.9, 0.1, 0.9) plwind(0., 1., 0., 1.) @@ -51,31 +67,94 @@ plptex(0.5, 0.5, 1., 0., 0.5, "#[0x2573]") else: plschr(0., 4.*size) + # Large circle via Hershey fonts. plptex(0.5, 0.5, 1., 0., 0.5, "#(907)") elif kind ==1: - # Print an ascii asterisk using plptex - plschr(0., 8.*size) - plptex(0.5, 0.5, 1., 0., 0.5, "*") + # Print a utf-8 plus + plschr(0., 16.*size) + plstring(x, y, "+") elif kind ==2: - # Print a (PLplot encoded) unicode indexed asterisk using plptex - plschr(0., 8.*size) - plptex(0.5, 0.5, 1., 0., 0.5, "#[0x002a]") + # Print a utf-8 squared plus + plschr(0., 16.*size) + plstring(x, y, "⊞") elif kind ==3: - # Print a (PLplot encoded) Hershey indexed asterisk using plptex - plschr(0., 8.*size) + # Print a utf-8 heavy plus + plschr(0., 16.*size) + plstring(x, y, "➕") + elif kind ==4: + # Print a utf-8 minus + plschr(0., 16.*size) + plstring(x, y, "-") + elif kind ==5: + # Print a utf-8 squared minus + plschr(0., 16.*size) + plstring(x, y, "⊟") + elif kind ==6: + # Print a utf-8 heay minus + plschr(0., 16.*size) + plstring(x, y, "➖") + elif kind ==7: + # Print a utf-8 times + plschr(0., 16.*size) + plstring(x, y, "×") + elif kind ==8: + # Print a utf-8 squared times + plschr(0., 16.*size) + plstring(x, y, "⊠") + elif kind ==9: + # Print a utf-8 heavy multiplication x + plschr(0., 16.*size) + plstring(x, y, "✖") + elif kind ==10: + # Print a utf-8 number sign + plschr(0., 16.*size) + plstring(x, y, "##") + elif kind ==11: + # Print a utf-8 full-width number sign + plschr(0., 16.*size) + plstring(x, y, "#") + elif kind ==12: + # Print a utf-8 asterisk + plschr(0., 16.*size) + plstring(x, y, "*") + elif kind ==13: + # Print a utf-8 four teardrop-spoked asterisk + plschr(0., 16.*size) + plstring(x, y, "✢" ) + elif kind ==14: + # Print a utf-8 8-spoked asterisk + plschr(0., 16.*size) + plstring(x, y, "✳") + elif kind ==15: + # Print a utf-8 asterisk operator + plschr(0., 16.*size) + plstring(x, y, "∗") + elif kind ==16: + # Print a utf-8 asterisk operator using plptex + plschr(0., 16.*size) + plptex(0.5, 0.5, 1., 0., 0.5, "∗") + elif kind ==17: + # Print a (PLplot encoded) unicode indexed asterisk operator using plptex + plschr(0., 16.*size) + plptex(0.5, 0.5, 1., 0., 0.5, "#[0x2217]") + elif kind ==18: + # Print a (PLplot encoded) Hershey indexed asterisk operator using plptex + plschr(0., 16.*size) plptex(0.5, 0.5, 1., 0., 0.5, "#(728)") - elif kind ==4: - # Print an asterisk using plsym - plssym(0., 8.*size) + elif kind ==19: + # Print an asterisk operator using plsym + plssym(0., 16.*size) plsym(x, y, 728) - elif kind ==5: - # Print an asterisk using plpoin - plssym(0., 8.*size) + elif kind ==20: + # Print an asterisk operator using plpoin + plssym(0., 16.*size) plpoin(x, y, 3) - elif kind ==6: - # Print a (PLplot encoded) Hershey indexed asterisk using plstring - plschr(0., 8.*size) + elif kind ==21: + # Print a (PLplot encoded) Hershey indexed asterisk operator using plstring + plschr(0., 16.*size) plstring(x, y, "#(728)") + else: + print("missing kind value: bad code") # Terminate plplot plend() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |