Histogram exported as an EPS appears blurry (other figuers do not)

7 ビュー (過去 30 日間)
J D
J D 2018 年 10 月 26 日
コメント済み: Federico Dominguez 2021 年 5 月 13 日
Hello,
I'm generating heatmaps and histograms as EPS files for a Latex document. The heatmaps appear cleanly as expected, but the histograms are distorted. Attached is an example from when I opened them in Inkscape (the histograms still look blurry in the Latex PDF too while the heatmaps look fine).
Blurry histogram
Clear heatmap
Code:
figure(2)
histogram(myData,10)
grid on
xlabel('Max Insertion Loss (dB)'); ylabel('Occurences');
set(gca, 'FontSize',20);
set(gca,'XTick',IL_lim_min+5:10:IL_lim_max);
xlim([IL_lim_min, IL_lim_max])
ylim([occur_lim_min, occur_lim_max])
saveas(gcf,[pwd '\LCOM Figs\InsertionLossHistogram_LCOM_L3'],'epsc')
Any help would be great! Thanks.

回答 (4 件)

Federico Dominguez
Federico Dominguez 2021 年 1 月 1 日
Hi, I think the problem is in the transparency of the histograms, which is not supported either by save or export_fig functions. Transparency can be disabled with histogram(myData,10,'FaceAlpha',1)
  2 件のコメント
Rudolf
Rudolf 2021 年 5 月 11 日
編集済み: Rudolf 2021 年 5 月 11 日
I had same problem, and this worked. But what if transparency is needed?
I get same problem on a figure with plot and stairs, i guess since i needed to use fill in that figure with 'FaceAlpha' below 1.
Federico Dominguez
Federico Dominguez 2021 年 5 月 13 日
I added transparency manually, using Corel Draw.

サインインしてコメントする。


Joh Hag
Joh Hag 2018 年 10 月 26 日
hi, you could try export_fig from file exchange.

J D
J D 2018 年 10 月 27 日
Thanks for the suggestion Joh. I tried that, but still the EPS outputs are pixelated and blurry.

Joh Hag
Joh Hag 2018 年 10 月 27 日
is the result from export_fig('file.eps', '-q101') also distorted by the artifacts? i just saw that you opened the files with inkscape... i also had these quality problems back in a day. it was caused by the inkscape import library which yielded only poor quality images. you can try an export as pdf, check the quality in your favorite pdf viewer and then also try to import the pdf in inkscape. maybe this yields better results, at least you would know the cause of the problem.
-johannes

カテゴリ

Help Center および File ExchangeHistograms についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by