0

したい:

for datafile in glob.glob('*.dat' )
    d = Gnuplot.File(datafile, using='1:2', with_='l', title=datafile)
    g("set key at xpos, [y variable position])
    g.plot(d)

[y variable position] は、y = #graph * (数値) などの単純な関数です。

どのように (いずれにせよ -- 最もエレガントなソリューションについて大声で叫ぶことはしません)、これを行うにはどうすればよいでしょうか?

ハーフ!ありがとう。

4

1 に答える 1

0
g = Gnuplot.Gnuplot(debug=1)
#xpos is always the same
xpos=0.0
for plotnr,datafile in enumerate(glob.glob('*.dat')):
    #ypos as a function of the plot-number, e.g.
    ypos=plotnr*2.0
    g("set key at "+str(xpos)+","+str(ypos))
    d = Gnuplot.File(datafile, using='1:2', with_='l', title=datafile)
    g.plot(d)
于 2012-06-21T06:50:51.023 に答える