Calling gnuplot from python

前端 未结 8 632
清酒与你
清酒与你 2020-12-04 18:34

I\'ve a python script that after some computing will generate two data files formatted as gnuplot input.

How do I \'call\' gnuplot from python ?

I want to se

8条回答
  •  借酒劲吻你
    2020-12-04 18:54

    The subprocess module lets you call other programs:

    import subprocess
    plot = subprocess.Popen(['gnuplot'], stdin=subprocess.PIPE)
    plot.communicate("plot '%s' with lines, '%s' with points;" % (eout,nout))
    

提交回复
热议问题