pcolor eps white line / diagonal polygon issue: Any sensible fix?!

You know the issue - there's countless threads dedicated to it, but I've still not found a suitable fix. My pcolor plot (actually m_pcolor from the m_map toolbox, but this should make no difference) needs to be output as a high quality vector image.
No matter which function I use (built in 'print', or 'export_fig' or 'savefig' from the FileExchange) I can't get rid of the white line artefacts. Yes, I realise that this is due to the image software used to open the file and how it renders the figure, but changing that isn't an option as this is for a journal figure and so the fix needs to be a 'real' fix. See an example of the problem here: http://www.matlab-cookbook.com/recipes/0050_Plotting/0040_2D_Data/blurry_eps.html
This suggestion (<http://www.mathworks.com/matlabcentral/fileexchange/43271-pcolor-eps-fix>) may actually work, but its not feasible for my figure which is large and has an enormous amount of patches or shapes that need fixing.
Any suggestions!? Thanks.

4 Comments

As discussed in this old thread , this is actually a bug in the antialiasing algorithm that is used by the application you're viewing the EPS file with. A lot of these applications use a simple antialiasing scheme which doesn't handle abutting polygons correctly.
For designers working with these tools, the traditional answer has always been that you should merge adjacent polygons together by hand. As you note, that can be a real pain when the number of polygons is large.
Another option is to simply disable antialiasing in the application you're using. Most of these applications have a way to disable it because of this bug. For example, in Adobe Illustrator, it's a checkbox on the "Edit/Preferences/General..." dialog.
Note that this is not an issue when you print, because printers don't use this antialiasing technique.
Thanks for the input Mike. Just wondered if someone has found a 'fix' for this inside Matlab, rather than making changes in the viewing software. Nevermind
This is absolutely ridiculous. I cannot create publication quality .eps figures, which severely limits the value of MATLAB. Mathworks needs to address this issue NOW. And I don't buy all the garbage about it being an image viewer issue. If I make the same figure with r2014a then I don't have the issue. In r2014b+, .eps files are not being saved properly.
I previously answered Here.
[Basically it says: Another work around is to use illustrator programatically fix_matlab_vector_graphics]
but only Mathworks can really fix this. And it appears that they still have not in 2017a

Sign in to comment.

Answers (1)

It's hardly an ideal solution, but my way of dealing with this is to export two images: one with only the pcolor object visible (no axes, lines, text, etc) to to a hi-resolution .png, and one with everything else to a vector format (.pdf usually, but it should work for .eps too). Then I use Adobe Illustrator to combine the two and save as a .pdf/.eps file. A bit of a pain, and of course it requires access to Illustrator, but it does result in the desired high-quality vector image without any white-triangle artifacts, as needed for a journal submission.

1 Comment

Ok thanks for the suggestion Kelly. Probably out of the question as I don't use Illustrator. I have Corel Draw but only use at a novice level really.

Sign in to comment.

Asked:

on 22 Jan 2015

Commented:

on 21 Dec 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!