import ppgplot
import numpy
import sys
 
# create an array
xs=numpy.array([1.,2.,3.,4.,5.])
ys=numpy.array([1.,4.,9.,16.,25.])
 
# creat another array
xr = 0.1*numpy.array(range(0,60))
yr = xr*xr

# pgplotting
if len(sys.argv) > 1: # if we got an argument use the argument as devicename
        ppgplot.pgopen(sys.argv[1])
else:
        ppgplot.pgopen('?')
ppgplot.pgenv(0.,10.,0.,20.,0,1)
ppgplot.pglab('(x)', '(y)', 'PGPLOT Example 1:  y = x\u2')
ppgplot.pgpt(xs,ys,9)
ppgplot.pgline(xr,yr)
ppgplot.pgclos()
