|
From: <bm...@us...> - 2008-01-14 22:15:14
|
Revision: 302
http://gnuplot-py.svn.sourceforge.net/gnuplot-py/?rev=302&view=rev
Author: bmcage
Date: 2008-01-14 14:15:19 -0800 (Mon, 14 Jan 2008)
Log Message:
-----------
allow svg output, add test
Modified Paths:
--------------
trunk/NEWS.txt
trunk/termdefs.py
trunk/test.py
Modified: trunk/NEWS.txt
===================================================================
--- trunk/NEWS.txt 2008-01-14 21:30:39 UTC (rev 301)
+++ trunk/NEWS.txt 2008-01-14 22:15:19 UTC (rev 302)
@@ -7,6 +7,8 @@
Version 1.8:
+* hardcopy allows for terminal='svg' (using a patch from Spyros Blanas)
+
* Use with_ instead of with as that will be a python keyword in the
future.
Modified: trunk/termdefs.py
===================================================================
--- trunk/termdefs.py 2008-01-14 21:30:39 UTC (rev 301)
+++ trunk/termdefs.py 2008-01-14 22:15:19 UTC (rev 302)
@@ -469,3 +469,11 @@
BareStringArg(argname='fontsize'),
]
+terminal_opts['svg'] = [
+ BareStringArg(argname='size', fixedword='size'), # tuple of two doubles
+ KeywordOrBooleanArg(options=['fixed', 'dynamic']),
+ StringArg(argname='fname', fixedword='fname'),
+ BareStringArg(argname='fsize', fixedword='fsize'),
+ KeywordOrBooleanArg(options=['enhanced', 'noenhanced']),
+ StringArg(argname='fontfile', fixedword='fontfile'),
+ ]
Modified: trunk/test.py
===================================================================
--- trunk/test.py 2008-01-14 21:30:39 UTC (rev 301)
+++ trunk/test.py 2008-01-14 22:15:19 UTC (rev 302)
@@ -243,6 +243,16 @@
wait('Testing hardcopy options: fontsize=20')
g.hardcopy('gp_test.ps', fontsize=20)
+ print '******** Generating svg file "gp_test.svg" ********'
+ wait()
+ g.plot(Gnuplot.Func('cos(0.5*x*x)', with_='linespoints 2 2',
+ title='cos(0.5*x^2)'))
+ g.hardcopy('gp_test.svg', terminal='svg')
+
+ wait('Testing hardcopy svg options: enhanced')
+ g.hardcopy('gp_test.ps', terminal='svg', enhanced='1')
+
+
print '############### test shortcuts ##############################'
wait('plot Func and Data using shortcuts')
g.plot('sin(x)', d)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|