How can I save multiple plots in a specified folder?

2 ビュー (過去 30 日間)
Zara Khan
Zara Khan 2018 年 6 月 3 日
コメント済み: Harr 2021 年 4 月 9 日
I have drawn major and minor axis over several binary images using a for loop. Now I want to save all these figures in a specified folder and want to off their visibility to the screen .
  1 件のコメント
Paolo
Paolo 2018 年 6 月 3 日
Can you share your code? You can specify the directory you wish to save to when using saveas.

サインインしてコメントする。

回答 (1 件)

monika shivhare
monika shivhare 2018 年 6 月 4 日
To off visibility of figures on screen
set(0,'DefaultFigureVisible','off')
To save all figures in specified folder,
path='D:\figures\';
saveas(figure(i),fullfile(path,['myPlot' num2str(i) '.jpeg']));
Refer to off visibility link to temporarily off visibility of figures on screen
save to a folder to save your files ion specified folder.
  1 件のコメント
Harr
Harr 2021 年 4 月 9 日
Thanmks Monika! I had similar problem.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by