Filter löschen
Filter löschen

How to save an open figure in an specified path?

1 Ansicht (letzte 30 Tage)
Mohammad
Mohammad am 24 Jan. 2014
Beantwortet: Image Analyst am 24 Jan. 2014
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?

Antworten (1)

Image Analyst
Image Analyst am 24 Jan. 2014

Kategorien

Mehr zu Software Development Tools finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by