Azzera filtri
Azzera filtri

How to save an open figure in an specified path?

1 visualizzazione (ultimi 30 giorni)
Mohammad
Mohammad il 24 Gen 2014
Risposto: Image Analyst il 24 Gen 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?

Risposte (1)

Image Analyst
Image Analyst il 24 Gen 2014

Categorie

Scopri di più su Software Development Tools in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by