How to save an open figure in an specified path?

3 visualizaciones (últimos 30 días)
Mohammad
Mohammad el 24 de En. de 2014
Respondida: Image Analyst el 24 de En. de 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?

Respuestas (1)

Image Analyst
Image Analyst el 24 de En. de 2014

Categorías

Más información sobre Software Development Tools en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by