setenv "PGPLOT_PNG_WIDTH", "320"
setenv "PGPLOT_PNG_HEIGHT", "240"

x = [1:2*pi*1000]/1000
lw = 5

plotdevice="sin.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv 0, 2*pi, -1, 1, 0, 0
pgslw lw
pgline nelements(x), x, sin(x)
pgend

plotdevice="cos.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv 0, 2*pi, -1, 1, 0, 0
pgslw lw
pgline nelements(x), x, cos(x)
pgend

x = [-pi*1000:pi*1000]/1000
plotdevice="tan.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv -pi, pi, -5, 5, 0, 0
pgslw lw
pgline nelements(x), x, tan(x)
pgend

x = [-1000:1000] / 100
plotdevice="sinh.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv -4, 4, -15, 15, 0, 0
pgslw lw
pgline nelements(x), x, sinh(x)
pgend

plotdevice="cosh.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv -4, 4, 0, 15, 0, 0
pgslw lw
pgline nelements(x), x, cosh(x)
pgend

plotdevice="tanh.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv -4, 4, -1, 1, 0, 0
pgslw lw
pgline nelements(x), x, tanh(x)
pgend

x = [-1000:1000] / 1000
plotdevice="asin.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv -1, 1, -pi/2, pi/2, 0, 0
pgslw lw
pgline nelements(x), x, asin(x)
pgend

plotdevice="acos.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv -1, 1, 0, pi, 0, 0
pgslw lw
pgline nelements(x), x, acos(x)
pgend

x = [-1000:1000] / 100
plotdevice="atan.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv -10, 10, -pi/2, pi/2, 0, 0
pgslw lw
pgline nelements(x), x, atan(x)
pgend

plotdevice="asinh.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv -10, 10, -pi, pi, 0, 0
pgslw lw
pgline nelements(x), x, asinh(x)
pgend

x = [1:1000] / 100 + 1
plotdevice="acosh.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv 0, 10, -pi, pi, 0, 0
pgslw lw
pgline nelements(x), x, acosh(x)
pgend

x = [-999:999] / 1000
plotdevice="atanh.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv -1, 1, -pi, pi, 0, 0
pgslw lw
pgline nelements(x), x, atanh(x)
pgend

x = [-10000:10000] / 1000
plotdevice="exp.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv -5, 2.5, 0, 10, 0, 0
pgslw lw
pgline nelements(x), x, exp(x)
pgend

x = [1:10000] / 1000
plotdevice="log.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv 0, 10, -2.5, 1, 0, 0
pgslw lw
pgline nelements(x), x, log(x)
pgend

plotdevice="ln.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv 0, 10, -2.5, 2.5, 0, 0
pgslw lw
pgline nelements(x), x, ln(x)
pgend

plotdevice="sqrt.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv 0, 5, 0, 2.5, 0, 0
pgslw lw
pgline nelements(x), x, sqrt(x)
pgend

x = [-5000:5000]/1000
plotdevice="erf.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv -2, 2, -1, 1, 0, 0
pgslw lw
y = x
for i=1, nelements(x) y[i] = erf(x[i])
pgline nelements(x), x, y
pgend

x = [-30000:30000]/1000
plotdevice="bessel.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv -30, 30, -.5, 1, 0, 0
pgslw lw
y = x
for i=1, nelements(x) y[i] = bessel(x[i],1,0)
pgline nelements(x), x, y
pgsch 4
pgtext 2, 0.8, "J\\d0,1\\u(x)"
pgend

x = [1:1000]/100
plotdevice="gammp.png/png"
pgbeg 0, plotdevice, 1, 1
pgscr 0, 1, 1, 1
pgscr 1, 0, 0, 0
pgenv 0, 10, -0.1, 1.1, 0, 0
pgslw lw
y = x
for i=1, nelements(x) y[i] = gammp(0.5, x[i])
pgline nelements(x), x, y
for i=1, nelements(x) y[i] = gammp(3, x[i])
pgline nelements(x), x, y
for i=1, nelements(x) y[i] = gammp(5, x[i])
pgline nelements(x), x, y
pgsch 2
pgslw 1
pgtext 0.8, 0.7, "a=0.5"
pgtext 4, 0.7, "a=3"
pgtext 6.5, 0.7, "a=5"
pgend

naxis1=naxis2=256
setenv "PGPLOT_PNG_WIDTH", "256"
setenv "PGPLOT_PNG_HEIGHT", "256"
hhh = gauss(129, 129, 100, 140, 70)
plotdevice="gauss.png/png"
pgbeg 0, plotdevice, 1, 1
pgswin 1, 256, 1, 256
pgsvp 0, 1, 0, 1
pggray hhh, 256, 256, 1, 256, 1, 256, 0, 1, [0, 1, 0, 0, 0, 1]
pgend

hhh = circle(129, 129, 120)
plotdevice="circle.png/png"
pgbeg 0, plotdevice, 1, 1
pgswin 1, 256, 1, 256
pgsvp 0, 1, 0, 1
pggray hhh, 256, 256, 1, 256, 1, 256, 0, 1, [0, 1, 0, 0, 0, 1]
pgend

hhh = ellipse(129, 129, 100, 129, 70)
plotdevice="ellipse.png/png"
pgbeg 0, plotdevice, 1, 1
pgswin 1, 256, 1, 256
pgsvp 0, 1, 0, 1
pggray hhh, 256, 256, 1, 256, 1, 256, 0, 1, [0, 1, 0, 0, 0, 1]
pgend

hhh = rect(129, 129, 120, 100, 70)
plotdevice="rect.png/png"
pgbeg 0, plotdevice, 1, 1
pgswin 1, 256, 1, 256
pgsvp 0, 1, 0, 1
pggray hhh, 256, 256, 1, 256, 1, 256, 0, 1, [0, 1, 0, 0, 0, 1]
pgend

hhh = delta(129, 129)
plotdevice="delta.png/png"
pgbeg 0, plotdevice, 1, 1
pgswin 1, 256, 1, 256
pgsvp 0, 1, 0, 1
pggray hhh, 256, 256, 1, 256, 1, 256, 0, 1, [0, 1, 0, 0, 0, 1]
pgend

hhh = cosbell(129, 129, 30, 120)
plotdevice="cosbell.png/png"
pgbeg 0, plotdevice, 1, 1
pgswin 1, 256, 1, 256
pgsvp 0, 1, 0, 1
pggray hhh, 256, 256, 1, 256, 1, 256, 0, 1, [0, 1, 0, 0, 0, 1]
pgend

hhh = chinhat(129, 129, 100)
plotdevice="chinhat.png/png"
pgbeg 0, plotdevice, 1, 1
pgswin 1, 256, 1, 256
pgsvp 0, 1, 0, 1
pggray hhh, 256, 256, 1, 256, 1, 256, 0, 1, [0, 1, 0, 0, 0, 1]
pgend

hhh = airy(3.5, .01, 2.2) * 100
plotdevice="airy.png/png"
pgbeg 0, plotdevice, 1, 1
pgswin 1, 256, 1, 256
pgsvp 0, 1, 0, 1
pggray hhh, 256, 256, 1, 256, 1, 256, 0, 1, [0, 1, 0, 0, 0, 1]
pgend

hhh = quickgauss(129, 129, 100, 3)
plotdevice="quickgauss.png/png"
pgbeg 0, plotdevice, 1, 1
pgswin 1, 256, 1, 256
pgsvp 0, 1, 0, 1
pggray hhh, 256, 256, 1, 256, 1, 256, 0, 1, [0, 1, 0, 0, 0, 1]
pgend

hhh = moffat(129, 129, 1.5, 100, 50, 30)
plotdevice="moffat.png/png"
pgbeg 0, plotdevice, 1, 1
pgswin 1, 256, 1, 256
pgsvp 0, 1, 0, 1
pggray hhh, 256, 256, 1, 256, 1, 256, 0, 1, [0, 1, 0, 0, 0, 1]
pgend

