Re: SVG issues; controlling shape and color of points independently?



In article <Oq2dnXupjZUMIDDenZ2dnUVZ_s2dnZ2d@xxxxxxxxxxxx>,
Ben Crowell <"crowell05 at lightSPAMandISmatterEVIL.com"> wrote:
>I've been outputting my graphs to EPS for inclusion in a book I'm
>doing in LaTeX. I would prefer to output them as SVG, since that
>would allow me to edit them in Inkscape if necessary, but I've
>been running into some problems.

I take it you are not a fan of editing eps files in Illustrator.
Or, like me, you're running on linux and have run into Adobe's
disinclination to provide linux versions of their tools.
Anyhow...

>One is that the only way I could
>figure out to get round dots in SVG output was to use pointtype 7,
>but then they come out as red dots, and I can't edit them in
>Inkscape.

SVG point type 7 is a triangle, implemented as:
<path id='gpPt7' style='stroke-width:%.3f' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>

SVG point type 5 is an unfilled circle, implemented as:
<circle id='gpPt5' style='stroke-width:%.3f' cx='0' cy='0' r='1'/>

SVG point type 6 is the same as 5, but filled:
<use xlink:href='#gpPt5' id='gpPt6' style='fill:currentColor; stroke:none'/>

>I haven't gone to the trouble of reverse-engineering
>the SVG output (it looks pretty opaque), but it looks like maybe the
>red dots are bitmaps rather than vector graphics, so Inkscape can't
>edit them and change them to black, which is what I want.

That diagnosis is not correct. All the point types are vector graphics.
At a guess, the problem may be that Inkscape does not fully implement
the SVG property "currentColor". The reason I am guessing that is that
a similar problem came up with regard to editing gnuplot SVG output in
Sodipodi. When Sodipodi got updated to recognize currentColor,
everything started working. Inkscape is a fork of Sodipodi, but it may
be that the fork point predates the fixes to color processing.

>Is there
>any way to work around this? As an alternative to generating more
>easily editable SVG, is there some way of controlling the color
>of the points independently of their shape? I spent a long time
>combing through the docs, but couldn't seem to find a way to do
>that.

Yes, you can control the color independent of the shape in gnuplot.
But that will not help you edit it in inkscape if the basic problem
is that inkscape does not recognizing the group of color commands
used by gnuplot.

>I guess this might just end up being a feature request for SVG output,
>which would be to make the symbols editable.

They are editable, or at least they were a year or so back when
I was using Sodipodi as an editor. I suggest you raise the issue
with the inkscape developers. If they have specific suggestions
for modifying gnuplot's output, we can have a look at doing that.
But it doesn't make much sense without confirming the source of the
problem, and set of alternatives available.

>It would also be nice
>if plots of smooth curves would come out as smooth as they do with
>EPS --- as things stand now, I have to work on the SVG output by
>hand in Inkscape to make the curve look smooth.

Right. That's on my list of things to work on. I believe it is
a matter of the internal resolution of the plot coordinates, and
can be fixed by redefining the scale transformation between the
internal and external coordinate systems. We'll see.
--
Ethan A Merritt
.



Relevant Pages

  • Re: Using SVG in preparing LaTeX documents
    ... Inkscape can save to PDF with any non-base fonts embedded. ... tool that created the SVG file, then I'm opening and closing Inkscape ... interest to the tiny TeX community. ...
    (comp.text.tex)
  • Re: can gimp edit filename.eps or filename.ai files?
    ... Am trying it on WinXP - looks like inkscape is the only one ... PSToEdit works on WinXP too and will convert the EPS to SVG, ... because Gimp is a bitmap graphics program. ...
    (comp.graphics.apps.gimp)
  • Re: Using SVG in preparing LaTeX documents
    ... It is simply that there is no easy way to take an SVG image ... like Inkscape and web-based tools like Gliffy). ... LaTeX documents use fonts available only thru TeX. ... The trouble with relying on dvi is that such tools will only be on interest to the tiny TeX community. ...
    (comp.text.tex)
  • [Full-disclosure] [ GLSA 200511-22 ] Inkscape: Buffer overflow
    ... A vulnerability has been identified that allows a specially crafted SVG ... Inkscape is an Open Source vector graphics editor using the W3C ... Security is a primary focus of Gentoo Linux and ensuring the ...
    (Full-Disclosure)
  • [Full-disclosure] [ GLSA 200511-22 ] Inkscape: Buffer overflow
    ... A vulnerability has been identified that allows a specially crafted SVG ... Inkscape is an Open Source vector graphics editor using the W3C ... Security is a primary focus of Gentoo Linux and ensuring the ...
    (Full-Disclosure)