A Python, SVG take on this Edward Tufte challenge
slopegraph.py
will generate a D3.js document and a LaTeX file containing
slope graphs of input data, with a specified title.
svg.py
contains code that generates the SVG image test.svg
. This
implements a two-column slopegraph, to be embedded in a document with
a title, etc.
User specifies two items in slopegraph.py
: filename
and title
.
filename
specifies a source data file, which is comma separated with three
columns:
label
: Item labelcol1
: Column 1, titled "col1" (or whatever)col2
: Column 2, title "col2"
title
, appropriately, gives the title of the chart.
To convert SVG to PNG, see Mike Bostock.