Re: SVG issues; controlling shape and color of points independently?
- From: merritt@xxxxxxxxxxxxxxxx (Ethan Merritt)
- Date: Sat, 24 Dec 2005 16:15:48 -0800 (PST)
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
.
- Follow-Ups:
- Re: SVG issues; controlling shape and color of points independently?
- From: Ben Crowell
- Re: SVG issues; controlling shape and color of points independently?
- References:
- SVG issues; controlling shape and color of points independently?
- From: Ben Crowell
- SVG issues; controlling shape and color of points independently?
- Prev by Date: Re: controlling width of tics?
- Next by Date: Re: controlling width of tics?
- Previous by thread: SVG issues; controlling shape and color of points independently?
- Next by thread: Re: SVG issues; controlling shape and color of points independently?
- Index(es):
Relevant Pages
|