Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
PDFs on the Mac look interpolated--why?

Subject: PDFs on the Mac look interpolated--why?

From: Rob Campbell

Date: 19 Oct, 2011 21:30:29

Message: 1 of 10

Hi,

I am generating EPS figures for a publication using the painters renderer. My figures are a mix of line plots and surface plots (imagesc, imshow). The EPS and resultant PDF files look fine on my Linux machine, but on a Mac the surface plots become interpolated and this creates a very misleading impression of the data. All PDF viewers on the Mac do this (preview, Acrobat, Skim, even Keynote). Is there some way I can suppress the interpolation without having to resort to making tiffs, which I really don't like.

Thanks!

Subject: PDFs on the Mac look interpolated--why?

From: Ken Prager

Date: 20 Oct, 2011 11:57:23

Message: 2 of 10

In article <j7nfhl$ob4$1@newscl01ah.mathworks.com>,
 "Rob Campbell" <matlab@robertREMOVEcampbell.removethis.co.uk> wrote:

> Hi,
>
> I am generating EPS figures for a publication using the painters renderer. My
> figures are a mix of line plots and surface plots (imagesc, imshow). The EPS
> and resultant PDF files look fine on my Linux machine, but on a Mac the
> surface plots become interpolated and this creates a very misleading
> impression of the data. All PDF viewers on the Mac do this (preview, Acrobat,
> Skim, even Keynote). Is there some way I can suppress the interpolation
> without having to resort to making tiffs, which I really don't like.
>
> Thanks!

How are you actually creating the output file? Are you using print()?
If so, are you setting the resolution (-r)?

I have found that I get the best results generating png formatted files.
They look better than the ones Matlab generates in ps, eps, or pdf
formats. Plus they are easily imported into other applications like
Keynote, Pages, Word, etc..

Cheers,

Ken P.

Subject: PDFs on the Mac look interpolated--why?

From: Rob Campbell

Date: 20 Oct, 2011 13:02:30

Message: 3 of 10


> How are you actually creating the output file? Are you using print()?
> If so, are you setting the resolution (-r)?
just "print -depsc"
No need to set the resolution because it's a vector image.

> I have found that I get the best results generating png formatted files.
> They look better than the ones Matlab generates in ps, eps, or pdf
> formats. Plus they are easily imported into other applications like

I'd rather use a vector format. To me, they look better, the files are small, and they make good Latex PDFs. I just don't understand why those PDFs become interpolated when viewed on a Mac. I can get around the interpolation issue by using a non-vector format, such as PNG, but I'd rather not do so.

Subject: PDFs on the Mac look interpolated--why?

From: Rob Campbell

Date: 20 Oct, 2011 20:45:10

Message: 4 of 10

Ok... I've found that disabling anti-aliased text on Mac makes the plots look ok. The text then looks ugly. however. The problem is that AA text is enabled by default in these readers and people won't know, and shouldn't need, to disable it.

Subject: PDFs on the Mac look interpolated--why?

From: Ken Campbell

Date: 21 Oct, 2011 21:14:09

Message: 5 of 10

"Rob Campbell" wrote in message <j7q18m$dst$1@newscl01ah.mathworks.com>...
> Ok... I've found that disabling anti-aliased text on Mac makes the plots look ok. The text then looks ugly. however. The problem is that AA text is enabled by default in these readers and people won't know, and shouldn't need, to disable it.

I don't know if this will help with your specific question, but have you tried export_fig? It's simplified a lot of the issues I had creating publication-quality figures.

http://www.mathworks.com/matlabcentral/fileexchange/23629-exportfig

Ken

Subject: PDFs on the Mac look interpolated--why?

From: Rob Campbell

Date: 25 Nov, 2012 18:26:09

Message: 6 of 10

Any word on this issue with eps file interpolation? Anyone at the Mathworks looking into this?

The stupid behavior of PDF readers on the Mac basically makes Matlab EPS files useless if they contain images or pcolor data. I currently have to convert Matlab EPS files to PNG using ImageMagick. The process is slow if good resolution is required and the resulting files are overly large.

Subject: PDFs on the Mac look interpolated--why?

From: Rob Campbell

Date: 25 Nov, 2012 19:10:10

Message: 7 of 10

It seems there may be a better fix than the PNG conversion rubbish. The problem is with imagesc not pcolor, so one can use pcolor and shading flat to produce an EPS file that looks reasonable apart from the thin white lines that appear on some readers.

http://stackoverflow.com/questions/6614207/how-to-export-non-blurry-eps-images

Subject: PDFs on the Mac look interpolated--why?

From: Steven_Lord

Date: 27 Nov, 2012 16:16:07

Message: 8 of 10



"Rob Campbell" <matlab@robertREMOVEcampbell.removethis.co.uk> wrote in
message news:k8tns1$4dp$1@newscl01ah.mathworks.com...
> Any word on this issue with eps file interpolation? Anyone at the
> Mathworks looking into this?

If you want to have an official answer from MathWorks, or want to enter it
into the enhancement or bug report databases, please contact Technical
Support using the instruction in my signature.

> The stupid behavior of PDF readers on the Mac basically makes Matlab EPS
> files useless if they contain images or pcolor data. I currently have to
> convert Matlab EPS files to PNG using ImageMagick. The process is slow if
> good resolution is required and the resulting files are overly large.

From the first sentence here I'm uncertain whether you're objecting to how
MATLAB exports files or how the PDF readers display the files exported from
MATLAB. MathWorks doesn't have any control over the latter; you'd need to
contact the authors of those software programs if you want them to change
how those programs work.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: PDFs on the Mac look interpolated--why?

From: Rob Campbell

Date: 27 Nov, 2012 21:42:15

Message: 9 of 10


> If you want to have an official answer from MathWorks, or want to enter it
> into the enhancement or bug report databases, please contact Technical
> Support using the instruction in my signature.
Thanks, I'll do that.


> From the first sentence here I'm uncertain whether you're objecting to how
> MATLAB exports files or how the PDF readers display the files exported from
> MATLAB. MathWorks doesn't have any control over the latter; you'd need to
> contact the authors of those software programs if you want them to change
> how those programs work.

What I'm wondering is whether the Matlab-generated EPS files can somehow force the reader not to interpolate panels that use imagesc. I don't know enough about the EPS format to know if this is possible. Clearly MathWorks has no control over how Apple design their PDF viewer, but some fix is needed because right now we're in a position where documents containing Matlab-generated figures can render radically differently on different platforms.

Subject: PDFs on the Mac look interpolated--why?

From: Benno

Date: 12 Jun, 2013 08:27:13

Message: 10 of 10

"Rob Campbell" wrote in message <j7nfhl$ob4$1@newscl01ah.mathworks.com>...
> Hi,
>
> I am generating EPS figures for a publication using the painters renderer. My figures are a mix of line plots and surface plots (imagesc, imshow). The EPS and resultant PDF files look fine on my Linux machine, but on a Mac the surface plots become interpolated and this creates a very misleading impression of the data. All PDF viewers on the Mac do this (preview, Acrobat, Skim, even Keynote). Is there some way I can suppress the interpolation without having to resort to making tiffs, which I really don't like.
>
> Thanks!

Hi Rob,

This problem drove me crazy, too. If you have Adobe Photoshop on your Mac, a temporary solution (until MathWorks corrects this bug) would be to open and save the Matlab created PDF with Photoshop. It will look everything fine, also if you open it later with the Mac Preview App.

Benno

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us