필터 지우기
필터 지우기

How to save an open figure in an specified path?

조회 수: 1 (최근 30일)
Mohammad
Mohammad 2014년 1월 24일
답변: Image Analyst 2014년 1월 24일
How can I save a file with the "print"? here is my code:
figNums=findobj(0,'type','figure');
for h=figNums
set(h,'paperunits','centimeters');
set(h,'paperposition',[w(1) w(2) a(1) a(1)*a(2)]);
textobj=findobj('type','text');
set(textobj,'fontunits','points');
set(textobj,'fontsize',w(3));
set(findall(h,'property','fontsize'),'fontsize',w(3));
set(gca,'fontsize',w(3));
set(findall(gca,'type','text'),'fontsize',w(3));
set(findall(h,'type','text'),'fontsize',w(3));
%new_name=strrep(p,'.fig','.png');
child=get(h,'children');
for y=1:length(child)
chi=child(y);
set(chi,'fontsize',w(3));
end
print(h,'-dpng','-r300')
end
running the program at the print line I get:
Warning: Files produced by the 'png' driver cannot be sent to printer. File saved to disk under name 'figure1.png'.
how can I save the job in .png format and in a path,that user gives. is there any "uiget" for such a thing?

답변 (1개)

Image Analyst
Image Analyst 2014년 1월 24일

카테고리

Help CenterFile Exchange에서 Software Development Tools에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by