4 ms·
Slightly off-topic, but anyone know what he's using to generate those inline SVG graphs? I've been looking for some easy to use graphing library like that to pr
by avar 10y ago
Slightly off-topic, but anyone know what he's using to generate those inline SVG graphs? I've been looking for some easy to use graphing library like that to present similar performance numbers on a webpage.
- bcherny 10y agoNo giveaways in the source code - will probably have to wait for the author to comment!
- nimrody 10y agoMy guess is that it's Gnuplot. At least gnuplot has an SVG driver: http://gnuplot.sourceforge.net/demo_svg_4.6/ http://gnuplot.sourceforge.net/demo_svg_4.6/
- rsc 10y agoI looked around but didn't find anything I liked. The regexp article [1] uses jgraph [2] to plot the data as eps, then ghostscript to turn eps to png. That no longer works in a world of variable-dpi screens, so for this article I generated SVGs and inlined them into the HTML. The SVGs are generated by a custom program I wrote for the job [3], to mimic the old jgraph graphs. It's not pretty code, but it gave me a lot of control over the presentation and produced decent results. You're welcome to adapt it if you like. [1] https://swtch.com/~rsc/regexp/regexp1.html https://swtch.com/~rsc/regexp/regexp1.html [2] https://web.eecs.utk.edu/~plank/plank/jgraph/jgraph.html https://web.eecs.utk.edu/~plank/plank/jgraph/jgraph.html [3] https://research.swtch.com/globgraph.go https://research.swtch.com/globgraph.go