フィルターのクリア

Filled figures, saved as eps or pdf, now have weird lines when zoomed in, while png files do not,

6 ビュー (過去 30 日間)
Noob
Noob 2021 年 3 月 16 日
編集済み: Abhinaya Kennedy 2024 年 5 月 8 日
Hi,
My filled figures, e.g. ellipses, using either the fill() or patch functions, and saved as eps or pdf files, now have weird lines -- so I tried saving my figures as png files and notice that these weird lines aren't there anymore. This is a fairly recent observation of mine. In the past, there were no issues with zooming into the figures. I've tried rendering the figures at various resolutions -- e.g. screen, auto, 300 dpi, and 600 dpi -- and I still see the weird lines when zooming into the figures.
For clarity, I do not think I have an issue with my pdf viewer; to check this, I looked through some of past rendered figures, saved as pdf files, and they look perfect when zoomed in. So, I think there's a recent change in Matlab ...
What could be the issue? And, is there a workaround for this?
Would using an additional vendor be advisable? I am thinking of purchasing a monthly subscription to Adobe Illustrator, but it's a bit pricey.
Thanks in advance,

回答 (1 件)

Abhinaya Kennedy
Abhinaya Kennedy 2024 年 5 月 8 日
編集済み: Abhinaya Kennedy 2024 年 5 月 8 日
Hi,
There are workarounds to avoid weird lines in eps/pdf exports of filled figures in MATLAB:
  1. Save as PNG: This format avoids the issue and offers good quality. (as you have rightly mentioned)
  2. Adjust renderer: Try "set(gcf,'renderer','painters')" before saving.
  3. Use "export_fig" function (File Exchange): This function (https://www.mathworks.com/matlabcentral/fileexchange/23629-export_fig) might produce cleaner eps/pdf outputs.

カテゴリ

Help Center および File ExchangePrinting and Saving についてさらに検索

製品


リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by