开发者

saving multiple outputs in different files

开发者 https://www.devze.com 2023-03-25 15:27 出处:网络
I have a program which generates several plots.. No开发者_运维百科w I need to save each plot in a different file like say: file1, file2, file2,...

I have a program which generates several plots.. No开发者_运维百科w I need to save each plot in a different file like say: file1, file2, file2,...

P.S: I am using Gnuplot to save and generate the plots:

g('set output \"test.ps\"')

How do I generate these names?


You need to use string formatting. The simplest option is to use

g('set output \"test%d.ps\"' % n)`

and make n increase.

0

精彩评论

暂无评论...
验证码 换一张
取 消