Save jpg Files Under Plot Title Name

6 次查看(过去 30 天)
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

采纳的回答

Sean de Wolski
Sean de Wolski 2013-5-16
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')))

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by