필터 지우기
필터 지우기

problems saving plot in 300 dpi

조회 수: 5 (최근 30일)
jan mischke
jan mischke 2015년 11월 17일
답변: balaji 2019년 3월 15일
Hi,
I am trying to find a decent way to make my matlab script automatically save plots into .pngs without using the export_fig function (I am not able to use it for my purposes). I recognized that when I use my way, there is an issue with the labels. If I save my png in 100dpi I can read it. My goal is it to save it with 300 dpi though. But when I do, sometimes the label gets just a grey bar with no text in it. It depends on the plot I want to save though. So sometimes I can save it in 300 dpi but sometimes there is this grey bar. Does anyone know how to solve this? Did anyone ever had the same problem?
Thank you
My code:
fig = gcf;
fig.PaperUnits = 'inches';
fig.PaperPosition = [0 0 18 9];
fig.PaperPositionMode = 'manual'
fname = ['Energy_resolved_',num2str(i).'_2'];
set(gcf,'Visible','off');
print(['-f',],'-dpng','r0','-r300',fname);
close(gcf);

채택된 답변

balaji
balaji 2019년 3월 15일
print(gcf,'test.png','-dpng','-r300');

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics and Visualization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by