You are not logged in.

#1 2012-01-14 16:50:08

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,386
Website

SVG graph maker

I am working on a program that will generate 'clean' svg (vector graphics) graphs from data sets.

It is still very much in it's infancy - so much so that I would not even yet announce it except for the fact that it came up in another discussion.  I figured I could open this thread to move the svg discussion here.

My current plans are for relatively simple barplots and scatter/line plots.  I'd like them to remain simple as they are created in such a way that they can be easily edited by the user after the fact.

This is in contrast to other tools I have used to create svg image files.  The R statistical package will create svg graphs, and programs like inkscape (or illustrator) can "trace" most image files to produce a vector image.  I see two major drawbacks of these methods.  First they create *enormous* files due to an extensive and unnecessary use of svg 'paths'.  Secondly, the resulting files may look good, but they are very hard to edit because 1) they are huge, and 2) they are quite 'convoluted' - if one looks at the resulting code, it is essentially unreadable.

I don't really see this as a criticism of the existing methods - as they do what they are supposed to.  My goal is to create a tool that does something different: create the skeleton of svg code that is easily human-readable and human-editable.

Prior to starting this tool I would make my svg's "by hand" with just a text editor.  By doing it this way I had complete control over the results, and my graphs would be several orders of magnitude smaller than similar ones generated by R or inkscape.

A bar graph, for example, can be some CSS styling, a couple axes, and some '<rect>'s for bars.  This could be just a dozen lines of svg code.  R, in contrast, would generate thousands of lines of svg '<path>'s for the same  result.



Later today I will get what I have so far up on my drop-box.  But I want to warn, again, that due to the expedited posting of this topic, the program is far from even "beta" ready.   I have tested it to generate some nice simple bar graphs currently with no axis labels, no error bars, nothing: just an x + y axis, and the data bars.

I'll put the dropbox link here, and post updates here.  I'd love to get feedback or feature requests once this gets rolling.

EDIT: here's the source

Last edited by Trilby (2012-01-14 21:33:10)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#2 2012-01-14 16:56:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,386
Website

Re: SVG graph maker

To follow up - I still suspect when this tool is doing what I want it to, I will still edit my svg's by hand in a text editor.  The primary goal of this tool is to automate many of the repetitive steps of coordinate conversions, and laying out the groups and tags appropriately.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB