import pyferret
pyferret.start(verify=False, journal=False, unmapped=True, quiet=False)
True
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')
(3, '')
from IPython.display import Image
Image('plot.png')
! 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