saving multiple outputs in different files
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.
精彩评论