Lines appear in vector graphics import

Post questions on how to use or achieve an effect in Inkscape.
tipsydragon
Posts: 6
Joined: Tue Sep 02, 2014 1:10 am
Location: Netherlands

Lines appear in vector graphics import

Postby tipsydragon » Tue Sep 02, 2014 1:32 am

Hello everyone,
I am importing a vector graphics image saved by Paraview (either as pdf, svg or eps). In all cases, I see grid lines (figure attached). I don't see this in evince (figure attached) or any pdf viewer or even Adobe Illustrator. I don't know if I am importing the figure in wrong way. I searched for last 2 days but I am not able to find anything (maybe I am doing it wrong). Can anyone please tell me what I am doing wrong. Or how to get rid of these lines.

Kind Regards and thanks in advance!!
Attachments
evince_1.png
Opened in evince (PDF viewer).
evince_1.png (172.5 KiB) Viewed 3878 times
inkscape1.jpg
File opened in inkscape
inkscape1.jpg (181.44 KiB) Viewed 3878 times

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Lines appear in vector graphics import

Postby tylerdurden » Tue Sep 02, 2014 2:12 am

Perhaps you can post a link to the pdf?
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

tipsydragon
Posts: 6
Joined: Tue Sep 02, 2014 1:10 am
Location: Netherlands

Re: Lines appear in vector graphics import

Postby tipsydragon » Tue Sep 02, 2014 2:17 am

Thanks for your reply.

Link to the PDF.
https://dl.dropboxusercontent.com/u/663 ... city_2.pdf

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Lines appear in vector graphics import

Postby brynn » Tue Sep 02, 2014 2:36 am

I think those "grid lines" are the bounding boxes of many, many, many objects. Try deselecting, after import (click in any open area of canvas) (with Selection tool).

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Lines appear in vector graphics import

Postby Lazur » Tue Sep 02, 2014 3:01 am

The pdf is probably made with gradient meshes, that doesn't have an svg support.
You can try some development builds if they show it right.
http://www.inkscapeforum.com/viewtopic.php?f=22&t=16091

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Lines appear in vector graphics import

Postby tylerdurden » Tue Sep 02, 2014 3:22 am

There are 52222 objects in the first group. I'm typing this while Inkscape ungroups them.

It might be worth lowering the data resolution to 25% or less, if the goal is a manageable illustration for a publication or report.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

tipsydragon
Posts: 6
Joined: Tue Sep 02, 2014 1:10 am
Location: Netherlands

Re: Lines appear in vector graphics import

Postby tipsydragon » Tue Sep 02, 2014 5:13 am

Thanks a lot for quick reply!!

@brynn : I am still very new to Inkscape. So figuring out what you told me. But I will do that.

@Lazur URH : Thanks for suggestion. I will install development version. As I have too many figures to do the same job. And hope it works. I don't have windows machine to use Adobe. I just want to stick to inkscape.

@tylerdurden : Ungrouping and deselecting are same?? And if not can you please tell me how to do that? I want to have high quality images as I use them for poster later.

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Lines appear in vector graphics import

Postby tylerdurden » Tue Sep 02, 2014 5:33 am

What you are seeing is an aliasing artifact of the display, not the image. You can zoom in greater than 10000% and the lines between the triangular objects do not get wider. When exporting to pdf for printing, they should not be an issue.

I don't think you will be hurt by reducing the sampling rate to 25% original, even if you are making a poster.

A sense of scale is shown in the attached image, each object is a fraction of the size of the first index mark.
Attachments
u_velo-ss.jpg
zoomed quite a bit, see the status bar
u_velo-ss.jpg (155.7 KiB) Viewed 3816 times
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

tipsydragon
Posts: 6
Joined: Tue Sep 02, 2014 1:10 am
Location: Netherlands

Re: Lines appear in vector graphics import

Postby tipsydragon » Tue Sep 02, 2014 6:26 am

Thank you very much for reply. I see that in new version (0.91) if I remove anti-aliasing than figure looks smooth in inkscape. But when I save it as png or pdf I see the lines again. Should I reduce the quality of original file and then work in inkscape? Or I am not understanding things properly at all?

Best Regards

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Lines appear in vector graphics import

Postby tylerdurden » Tue Sep 02, 2014 6:50 am

Well, that's unfortunate...

My general impression is that the background does not need to be high resolution. I might generate a low resolution version and see if it can be blurred in a raster format to eliminate any aliasing and imported into inkscape for adding vector elements.

Some other regulars here may have some other ideas. :-)
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Lines appear in vector graphics import

Postby Lazur » Tue Sep 02, 2014 7:06 am

The original file was made with gradient mesh.
When you open it in inkscape, the mesh is represented with the triangles.
Each triangle is next to another one with no gaps, but renders with it because of anti-aliasing issue.
Gaps can be avoided only on vertical and horizontal edges, if they lay on the exported area's pixel grid, but will appear on the diagonals.

You can put a rectangle behind with some fill colour so that at least those gaps won't be transparent when exported to a png.
Could improve it a bit if the triangles were duplicated and blurred.
But that case, a raster copy of the original gradient mesh would be a better solution -since the blurring is a raster filter.

Once you save it as svg/pdf with inkscape, the rectangles won't be converted back to a gradient mesh, with smooth transitions.

Only some development builds can handle these meshes right.
Crystal sharp transitions, in large scales.
If the final result won't be printed in such formats, a raster copy may be an easier solution.
If possible, try to generate those as rasters with paraview.

tipsydragon
Posts: 6
Joined: Tue Sep 02, 2014 1:10 am
Location: Netherlands

Re: Lines appear in vector graphics import

Postby tipsydragon » Tue Sep 02, 2014 7:28 am

@tylerdurden : Thanks a lot for your help!

@Lazur : Thank you! Yes, I think I will save original as raster images. I had stopped doing that when I got bad images when transparency was used in paraview.

When anti-aliasing (development version) was removed, image looked fine in inkscape. Only when I save it went back to lines. Is there any reason why this happens? (just curious)

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Lines appear in vector graphics import

Postby Lazur » Tue Sep 02, 2014 8:07 am

I don't know, I'm running Inkscape 0.48.4 r9939 on opensuse.
Maybe developers can tell at launchpad.

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Lines appear in vector graphics import

Postby tylerdurden » Wed Sep 03, 2014 1:49 am

You could import a raster version generated by free PDFill tools (windows) or similar. The PDF-to-image tool can output 600dpi raster images nicely.

I'd generate a version of just the background and bring it into Inkscape like the linked example (which still has the other graphic objects in the background).

I placed the vector tickmarks and loops on higher layers, then deleted the 5000+ objects of the background.
With a clean raster image in the background, the other elements could be cleaned-up and additional elements added.

u_velo-importRast-ss.jpg
u_velo-importRast-ss.jpg (109.8 KiB) Viewed 3687 times


The file is ~2MB
https://dl.dropboxusercontent.com/s/gpp ... Raster.svg
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

tipsydragon
Posts: 6
Joined: Tue Sep 02, 2014 1:10 am
Location: Netherlands

Re: Lines appear in vector graphics import

Postby tipsydragon » Wed Sep 03, 2014 5:01 am

@tylerdurden : Thanks for the input. I created raster images directly from paraview today and things are working fine for 2-d plots atleast :). I have asked the question about the support on launchpad, when they reply I will post it here.

In all, thanks a lot guys for your input. Its been very helpful.

Cheers


Return to “Help with using Inkscape”