losing lines when importing gnuplot-generated svg's

Bug #196291 reported by Torsten Rohlfing
2
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

The current SVN version loses all lines when importing SVGs generated by gnuplot. An example file is attached.

A previous version, inkscape-0.45.1-5.fc8, worked fine, so I don't think it's a gnuplot problem.

Revision history for this message
Torsten Rohlfing (torsten-synapse) wrote :
Revision history for this message
Torsten Rohlfing (torsten-synapse) wrote :

Okay, so it seems inkscape doesn't actually LOSE the lines (paths), but it appears to be ignoring the stroke color.

Here's the style property of one path:

fill:none; color:red; stroke:currentColor; stroke-width:2.00; stroke-linecap:butt; stroke-linejoin:miter

And this is the property after I manually set it's color to black in inkscape (after which the path appears fine):

fill:none;color:red;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1

So to soften my prior statement, I surely have no idea whether the current inkscape SVN correctly interprets the SVG produced by gnuplot with incorrect properties, but if that's the case then it definitely seems previous versions of inkscape were more tolerant.

Revision history for this message
Ahmad Syukri Abdollah (syockit) wrote :

In the meantime, try the following fix, or anything similar to it.
http://linuxtnt.wordpress.com/2008/04/19/fix-for-gnuplots-buggy-svg-output/
Replace what currentColor with the color defined in "color:" property.

By the way, Opera 9.51 and Mozilla Firefox 3 seems to render them fine as they are. According to the site I mentioned, the currentColor is white so everything (though when I set the background color to something else, the lines still don't appear) dissapears from sight, although still existing. Either Inkscape's interpretation is incorrect, or it's too strict, I don't know much about SVG standard though.

To add, plot points are also lost. To make them reappear, you have to change the fill color as well.

Revision history for this message
aisomur (aisomur) wrote :

I implemented the regex string in an inkscape extension, according to
http://linuxtnt.wordpress.com/2008/04/19/fix-for-gnuplots-buggy-svg-output/

It works with inkscape-0.46 on Gentoo Linux and Windows XP.
Maybe it's convenient when you open the SVG files generated by old versions of gnuplot.

Just for reference, you can install svgfix.inx and svgfix.py into following places:
${HOME}/.inkscape/extensions (Linux)
or
c:/Program Files/Inkscape/share/extensions (Windows)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.