0.0
No commit activity in last 3 years
No release in over 3 years
Creates the axes and gridlines for a graph in SVG. Perfect for creating a static background to which live data can be added.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.4
~> 1.5
 Project Readme

svg-plot-gen creates the axes and gridlines for a graph in SVG. Perfect for creating a static background to which live data can be added.

When not to use this

You just want to plot a graph. If you're using Python, check out Pygal, otherwise take a look at gnuplot.

When to use this

When you've got the same format of graph that you just want to plot over and over again, and you haven't got an enviroment that supports plotting graphs some other way. Maybe you're working on an embedded system, have a bash script that for some reason can't use gnuplot or you're trying to make a CouchDB list function output an SVG graph.

Another rationale for using this is that you don't want to waste processing power generating axes and gridlines every time you want to output a graph.

Installation

svg-plot-gen is written in ruby and uses nokogiri to output SVG.

You'll need to install ruby and ruby gems if you haven't already got them installed. Then it should just be a case of running

gem install svg_plot_gen

What it does

It outputs an SVG file that looks somewhat like this to stdout.

That's all.

Usage

Run

svg_plot_gen --help

to see details of all the command line options.

Templates

Specifing the -t option means the output will contain two [SPLIT] tags that can be replaced with data by a stream editor like sed or whatever string manipulation functions exist in your language.

The first [SPLIT] tag is for a line graph. If a path is substituted in using the format specified here then this will be overlayed on the graph. The path is transformed to be relative to the origin of the axes and so that up is positive.

The second [SPLIT] tag is in the display attribute of a 'No Data Found' marker, and can be substituted for inline to display this marker.

License

MIT