| simpleSVG |
| A Python program to produce SVG graphics. Version 0.12 is new on October 6, 2008. |
SVG is a vector graphics format. I confess here that when I first heard of the term "vector graphics", I thought it was referring to plots with lots of little arrows. Nope, that is not what it means! Here are some definitions of "vector graphics".
simpleSVG is intended to replace vplot, which produced postscript graphics. Like vplot, simpleSVG is intended to simplify the use of graphics primitives, to make nonstandard plots that are not available in traditional plotting programs.
import simpleSVG a=simpleSVG.svg_class() a.scale() a.circle(.5,.5,100,fill='red',stroke='none') a.rect2(0., .15, 1., .85) a.close() ^D
You will produce a file temp.svg, which can be viewed with inkscape.
Another test is to simply execute the module simpleSVG.py, which by default runs an enclosed test program. The following SVG graphics, testSVG.svg, is produced:
But here is something to try: zoom into this web page a bunch of times by repeatedly hitting Ctrl++ (firefox). Compare the above images. You will see the advantage of a vector graphic. To restore normal zoom, type Ctrl+0.
|
Attributes Diagram |
Lorenz Equation |
Wind rose |
Wind rose 2 |
Wind rose 3 |
|
Gradient wind plot |