In [1]:
import pyferret

In [2]:
pyferret.start(verify=False, journal=False, unmapped=True, quiet=False)


Out[2]:
True

In [5]:
pyferret.run('set redirect/clobber/file="out.txt" stdout')
pyferret.run('set window/xpixel=300/aspect=0.8 1')
pyferret.run('list i[i=1:10]')
pyferret.run('plot sin(i[i=1:10])')
pyferret.run('frame/file="plot.png"/format=PNG')
pyferret.run('cancel window 1')
pyferret.run('cancel redirect')


Out[5]:
(3, '')

In [6]:
from IPython.display import Image
Image('plot.png')


Out[6]:

In [7]:
! cat out.txt


             VARIABLE : I
                        axis ABSTRACT
             SUBSET   : 10 points (X)
 1    /  1:   1.00
 2    /  2:   2.00
 3    /  3:   3.00
 4    /  4:   4.00
 5    /  5:   5.00
 6    /  6:   6.00
 7    /  7:   7.00
 8    /  8:   8.00
 9    /  9:   9.00
 10   / 10:  10.00

In [ ]: