[Celinux-dev] Fun python project (svgchart) free to a good home
Tim Bird
tim.bird at am.sony.com
Tue Nov 21 11:18:04 PST 2006
Gross, Mark wrote:
> Now, I'm not saying I'll do anything with this but....
My posting of it is a shot in the dark. If someone
picks it up I'll be pleased, but it no one does I'll just
keep plinking on it myself (very slowly - look for
release 1.0 sometime in 2008 :-).
> If there were some more descriptive requirements or use cases, and
> examples of input data and type types of plots that are expected to
> squirt out of this code that would help.
Good suggestions. I'll try to beef up the wiki page with
some of this. For right now, I just want to duplicate
the functions used by bloatwatch and kconfigsize. They
only use 3 chart types: line, pie and 3Dbar (and I can
substitute just regular bar for 3Dbar.)
> Also, what's not finished with this thing? It makes some plots.
Most things that need to be done to finish up a 1.0 release
are marked with "FIXTHIS" comments in the code. Just
'grep FIXTHIS svgchart.py' to see the list. There are 16
items right now.
> Is it only the data API for sucking in data to be graphed?
No. It is assumed that the data-reading is specific to
the presentation program. This is just a general module that
any data-reading program can use to create web-based charts.
I also have ideas for writing a generalized results-processing
module, but I've been thinking of that as a separate effort.
Maybe it would be more interesting to publish the two
together. (But at the moment, the other code is even less
ready for prime time than svgchart.)
The long term goal is for svgchart to eventually support as
much of the documented pygdchart API as possible. There's
a link to the pygdchart documentation in the comments in
the program. But here's a direct link:
http://www.nullcube.com/software/pygdchart2/doc/
However, gdchart supports a large number of graph types and
many different options. For svgchart to be able to replace
gdchart in the testlab scenario, we only need a pretty
small subset of this, and this is where I'd like to focus.
The kconfigsize web gui, which uses pygdchart, is already
published at
http://tree.celinuxforum.org/CelfPubWiki/KernelConfigWeight_2fKconfigSize_5fRev0_5f2
> BTW its missing an ability to handled (x,y) pairs of input data. (The
> current line code assumes a fixed step size between x values in the data
> list of y values.)
Yep, it needs some work to generalize it. It doesn't autoscale
the x and y ranges, or auto-determine the grid ticks. It doesn't plot
the back grid, or label the axes, or even put the title on the chart.
> The esthetic quality of plots created in this way are unlikely to be
> competitive against the output of other tools that create jpg's or png
> images.
In it's current form, the plots are pretty crude looking.
However, I think that this is easily remedied. I actually think
this approach should eventually produce nicer-looking graphs since
SVG is (by definition) scalable. Charts and graphs
in jpg and png suffer from rasterization effects. An SVG
"image" can be scaled to any size, and should display
well at any reasonable resolution. This, combined with the
fact that it doesn't require any special libraries on the
computer producing the charts, are what make this an
attractive solution, IMHO.
Thanks very much for looking at it and giving me
some feedback!
-- Tim
=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics
=============================
More information about the Celinux-dev
mailing list