February 8th, 2008

I really kick myself now for not including a mention of gnuplot in "Painting the Web". I had one chapter on graphics and data, and it would have been a nice fit. However, it does need a nice installation environment for the Mac, and that was one of the criteria for including mention of tools.

We're told that a Mac-specific installation of gnuplot is coming. When it does, I'll include a link in the graphics tools section of the book's supplementary site.

Another handy graphical tool is svgfig, which allows you to draw mathematical figures in SVG using Python. This tool should be very simple to install if you have Python installed. Using it, though, does require an understanding of math. Of course.

I would say that 2008 is the year of SVG in addition to the year of semantics. Works for me, though perhaps I should have called my book, "Painting the Semantic Web".

(Thanks to Michael Bernstein for mention of svgfig)

Comments
1
Michael R. Bernstein - 6:54 pm February 8, 2008

You're very welcome!

2
Bud Gibson - 7:02 pm February 8, 2008

svgfig looks very neat. I've done a lot of plotting in my day, mostly going from R or S-plus (stats programming packages) to pdf or ps. The notion that you could create a library with this seeming capability in 2300 lines of code is simply astonishing and a tribute to the power of declarative programming.

Of course, as you point out, declarative programming is really only powerful if people produce standards compliant engines that perform to spec.

Looking a(n extremely) little bit at svg markup, another observation is that you don't really need a procedural programming language like Python to manipulate it programatically. There's always good old XSLT, though I may be one of the few who would make such a statement.

IE support is not going to matter much to the early adopter crowd in the research and scientific communities where I can see this getting real traction (once people have heard of it). I'm not sure where the wider market is. What's javascript support like? Do you have to use DOM methods? Has anyone written a jQuery-like library a la svgfig?

3
Bud Gibson - 9:41 am February 9, 2008

Well Shelley, you gave me the svg bug in a bad way. A few questions. To what extent does your new book cover svg and embedding svg? I like the wiki at wiki.svg.org. Inkscape seems like a decent free tool even if it does require X11.

My best guess is that this is one of those situations where you want to find the common subset of the standard that is supported across browsers.

Examining the source of your page, I see you are using the inline svg approach with a namespace. According to the svg wiki, that approach is both the hardest to get to work and the easiest in terms of browser rendering and scripting because the svg becomes part of the standard dom tree.

My preference, however, might be to use the object tag. Setting up namespaces and translating your svg markup into those namespaces are complicating steps that seem like they could easily go wrong. To the extent you can avoid namespaces, this will all be better because you remove the requirement that there be an xlmns attribute in the root element. I now understand why you were so adamant on issues of svg support in html5.

Thanks to all those who have contributed to the discussion. Comments are now closed, but you can contact the author of the post directly.