From: Ethan M. <merritt@u.washington.edu> - 2009-09-14 17:59:30
|
On Monday 14 September 2009 10:47:05 James R. Van Zandt wrote: > > I'm trying to use the svg terminal in a recent version of gnuplot: > > G N U P L O T > Version 4.3 patchlevel 0 > last modified March 2009 > > I can generate a sample file like this: > > set term svg enhanced > set out "sine.svg" > set label "e^{i{/Symbol p}}=-1" at graph .5,.5 > plot sin(x) > set out > > When I display the output using inkscape 0.46, I see three problems: > > - All the lines are missing > - The superscripted characters are spaced out > - The Greek letter pi appears as "p". > > By googling I came up with workarounds for the first two problems: > > perl -p -i -e 's/color:([^;]*); *stroke:[^;]*;/color:$1; stroke:$1;/' sine.svg > perl -p -i -e 's/xml:space=.preserve.//' sine.svg > > Does anyone have suggestions about the Greek letters? (1) Fonts SVG is an XML variant, which means it natively uses UTF-8 encoding. The "Symbol" font is an Adobe-specific encoding that nobody else uses. So it works for PostScript and PDF, but probably nothing else. Use UTF-8 (2) Spacing Inkscape is broken. But hey, so are all the other SVG viewers I know of. (3) General problems We worked with the Sodipodi developers to fix a bunch of problems, but when Sodipodi was forked to Inkscape they seem to have forked it from an unfixed version. On a similar note, in KDE3 the ksvg viewer was probably the best of a bad lot. But KDE4 switched to something else that doesn't work at all well. I've given up on SVG. I suggest to use the canvas terminal instead. -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |