Reply to topic  [ 2 posts ] 
mesh imprinting in EPS/PDF graphic files 
Author Message

Joined: Tue Apr 18, 2006 6:11 am
Posts: 2
Location: Sandia National Labs
Post mesh imprinting in EPS/PDF graphic files
I have a fairly high resolution contour plot that I need to have exported into EPS or PDF format. When I use either the PDF or EPS yorick commands, the graphic file has an faint imprint of the mesh that can be seen in ghostview,acroreader, etc. even though I didn't plot the mesh lines. If I physically print the graphic file, I don't see the mesh imprint. Is there something I can do to ensure this mesh imprinting can't be seen with image viewers?

Kyle


Wed Nov 14, 2012 2:03 pm
Profile
Yorick Master

Joined: Mon Nov 22, 2004 9:43 am
Posts: 354
Location: Livermore, CA, USA
Post Re: mesh imprinting in EPS/PDF graphic files
Unfortunately, no. It is a bug in the postscript/pdf viewers. If you examine the yorick-generated postscript files, you will see that your mesh consists of a sequence of filled quadrilateral paths. The (Adobe!) definition of postscript requires that when two paths share an edge, and yorick always generates adjacent quads with identical integer coordinates on the edge they share, the edge gets drawn exactly once, with the color of the interior of one of the paths (I think it's the one to the right or below, but I don't remember -- read the postscript documentation available from Adobe -- it's quite definite about this). Unfortunately, many if not all postscript interpreters fail to follow this rule in all possible cases, leaving some edges undrawn. The problem is exacerbated by the fact that some display programs render the edges by invoking a second, non-postscript library which pretends to have the same primitive, but has this rendering bug. So it's not always the program you think is displaying (ghostscript, acroread, or whatever) that contains the bug. Macs seem to have the problem particularly badly, since there are many layers of postscript renderers there. Often, the problem is only on the display -- when you print the same file, the artifact vanishes. Also, zooming the image to a different size can make it appear or disappear. One thing you can try is to turn anti-aliasing on or off, as this sometimes has an effect.

The bottom line is, as far as I can tell, the yorick-generated postscript files made using plf commands are correct, and the problem is that few programs can render this type of image correctly. It is very difficult to report this type of bug, since it may or may not show up on the developer's platform -- the same file renders differently on different platforms. I would greatly appreciate it if anyone could track this down, or make any recommendation about how to work around this problem, which is exceedingly frustrating. I do not understand why it doesn't show up more frequently in other vector rendered output -- I'm guessing that it's just fairly rare. A program like inkscape ought to have similar problems... Does anyone know if it does?


Sun Nov 18, 2012 4:52 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.