Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hopefully this is me doing something wrong, but if my suspicions are a correct and it's a bug I'll submit a bug report.

I have an svg file (originally drawn by matplotlib, but I suspect that's not relevant). I scaled some paths in height only (and clipped them), now when I load the pdf in evince, gimp or gv *-- but not inkscape -- the stroke width is scaled in height as well, though I did not have the scale stroke when scaling affect selected.

Opening the pdf in inkscape and exporting as .png:

enter image description here

opening the same pdf in the Gimp:

enter image description here

some unscaled paths are seen on the left as well.

Is there anything I can do about this? I really need to work on the svg rather than going back to the data processing and modifying the code in matplotlib, and I need to scale by an integer by typing, not by dragging.

Edit: *I've just install foxit on my windows vm - the same as everything except inkscape

Edit2: Here's a minimal(ish) svg that shows the problem (really, no SVG upload?):

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape ( -->

   viewBox="0 0 69.499992 26.406493"
           rdf:resource="" />
       id="style6" />
     d="m 73.4966,215.574 2.6784,0.104 5.9148,0.341 11.9412,-0.054 21.874,-0.079 9.597,-0.184 4.911,-0.321 2.901,-0.402 4.018,-0.785 0.446,-0.378 0.447,-0.689 0.446,-1.086 0.558,-2.019 0.67,-3.471 0.781,-5.406 1.227,-10.454"
     style="fill:#ff0000;stroke:#0000ff;stroke-width:1;stroke-linecap:square;stroke-linejoin:round" />
         style="stroke-linecap:square;stroke-linejoin:round" />

*To demonstrate, stretch in height only than save as pdf and open in your viewer of choice (except inkscape).

Note that I've added a fill to prove that it's just a path and not an object being scaled

More new info - if I remove the clip, it scales as it should*

share|improve this question
At the moment the best option looks like taking each of the <path>s into libreoffice, recalculating the coordinates and putting them back! – Chris H Jan 15 '14 at 11:15
Are you sure, that your line actually is the stroke of a path and not the inside of a line-shaped polygon (i.e., what you get if you apply Stroke to Path to a normal path)? Alternatively, the paths in question look scaled in one direction – maybe this helps to find the source of the issue. – Wrzlprmft Jan 16 '14 at 11:03
Also, could you reduce your problem file to a minimal example and post it? – Wrzlprmft Jan 16 '14 at 11:24
@Wrzlprmft, I'll try - not sure if I have a copy of the file with me today. I suppose there's a chance matplotlib did something daft, but I'm pretty certain that it didn't - there's no fill colour only stroke, and the "filled" region is wider than twice the stroke width. – Chris H Jan 16 '14 at 11:45

In the end I did what I said in my comment, but I still think there must be a real solution. I only had 4 paths in one file to deal with (I have seen this before actually, but the aspect ratio of the scale wasn't as bad and I didn't have time to worry about it).

This is what I did:

  • Note the object IDs of the paths I wanted to edit
  • open the .svg in jEdit
  • Find each path in turn
  • work on the d attribute
  • replace " " with "\n"
  • copy into libreoffice calc
  • multiply the 2nd column, except the first 2 rows (only the 2nd of which was numeric) and the last row by 20 (my scaling factor)
  • back to jEdit
  • replace "\t" with "," (except after the "m", when it was just deleted
  • replace "\n" with " "
  • paste over the original path
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .