![]() | Make Gnuplot script:
f = open(case + '.gnuplot', 'w') f.write(""" set title '%s: m=%g b=%g c=%g f(y)=%s A=%g ...'; ... ... """ % (case,m,b,c,func,A,w,y0,dt,case,case)) ... f.close() |
![]() | Run Gnuplot:
cmd = 'gnuplot -geometry 800x200 -persist ' \ + case + '.gnuplot' failure, output = commands.getstatusoutput(cmd) if failure: print 'running gnuplot failed'; print output; sys.exit(1) |