Borrar filtros
Borrar filtros

Save jpg Files Under Plot Title Name

6 visualizaciones (últimos 30 días)
Amanda
Amanda el 16 de Mayo de 2013
I have a collection of simple plots with the titles displaying:
Indiana
Montana
Texas
Arizona
I need to take these plots and save the plots as jpg files by their TITLE name in a folder named States:
Folder:States
Indiana.jpg
Montana.jpg
Texas.jpg
Arizona.jpg
Thanks,
Amanda

Respuesta aceptada

Sean de Wolski
Sean de Wolski el 16 de Mayo de 2013
doc saveas %or print
doc get
doc sprintf
Gte the string from the title of the axes:
For example:
figure;axes;plot(magic(20));title('Happy Thursday');
saveas(gcf,sprintf('%s.jpg',get(get(gca,'title'),'string')))

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots 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