Change print format of all output figures using one command

1 回表示 (過去 30 日間)
Karthik
Karthik 2014 年 12 月 15 日
編集済み: Karthik 2014 年 12 月 16 日
Hello, I am using the following command to print my figures into jpeg format.
print('-djpeg', '-r300', fig.1);
I have around 50 figures in my script. How can I change the format from jpeg to any other format for all the figures at once (without changing it for every figure) ?
Thanks
  2 件のコメント
Amit
Amit 2014 年 12 月 15 日
Do you have 50 figures plotted or do they get plotted in a script consecutively?
Karthik
Karthik 2014 年 12 月 15 日
編集済み: Karthik 2014 年 12 月 16 日
They follow one after the other in the script.

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

回答 (1 件)

Henrik
Henrik 2014 年 12 月 15 日
So you have this command 50 places in the script?
A quick fix would be to do a search and replace for print('-djpeg' --> print('-epsc' (or whatever format you want)
It would probably be a good idea to try and either use functions or some kind of loop to make all those figures, since as you've discovered, this way it's hard to change the code.

カテゴリ

Help Center および File ExchangePrinting and Saving についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by