4.3BSD/usr/contrib/apl/lib/plotws

n*.KB	H
plota plot b;c;d;f;g;h;i;j;l;t;y;hz;nb;vt;pt;st;isv;u
pc { 'O*JGHL'
hs{0
st { 1 2 5
sm { 5 10
}((0=X/(2Ra),Rb), 3 2 1<RRb)/0,pl7,pl1,pl2
}pl2,Rb{O\(2,d)R(Id{R,b),b
pl1: b{b[1;;]
pl2: y{1+I(Rb)[2]-1
c{((S/S/b[;y])-D/D/b[;y]),(S/b[;1])-D/b[;1]
f { |(2Ra)%c+(c=0)Xb[1;2 1]+b[1;2 1]=0
f { (st[+/(0.0001+fX10*-g)J.&st])X10*g{D10O*f
g{ (sm%f)XD((D/D/b[;y]),D/b[;1])Xf%sm{16DsmS1 4
b[;1]{D0.5+f[2]Xb[;1]-g[2]
b[;y]{D0.5+f[1]Xb[;y]-g[1]
h { smXS((S/S/b[;y]),S/b[;1])%sm
nb { g[1]+(sm[1]%f[1])X0,Ih[1]%sm[1]
hz { g[2]+(sm[2]%f[2])X0,Ih[2]%sm[2]
0Rst{6R~isv { 1#u { 9
pl3:vt { V/0>nb { nbX10*u-st[6-isv] { i { 1+S/D10*O|(nb#0)/nb
pt { D1+10|pt-1|pt { 0.00001+(|nb)J.%10*`1+O|Iu
l { u+1-(O|((c { Rnb)R1)^.=pt)I0
xpl1:}((u>t { vt+S/i,(l+l#i),(i$0)X2+l-i),st[2-isv] { st[2-isv]Vl&u-vt+l>i)/3 2+xpl1
} xpl1,Rst[4-isv] { i { 1
}pl3,Rnb{sm[1+~isv]X`1+Ic
pt { (-vt+0S1-i)O|pt
pt { (,pt)Xj { ,O\(O|Rpt)R(,O\(1#pt)V.^(Iu)J.$IvtSi-1),(cXu+1-i { vt+iSi$0)R1
}(~vt)/xpl2
pt[(u-+/(c,u)Rj)+uX`1+Ic] { 11Xnb<0
xpl2: pt { (~(Iu+j)E(i+j),I`1+j { u-t)\(1 0+c,u)Rpt,uR0
pt[Ic;i+j] { 12
pt { ' 0123456789`.'[1+pt[;Iu-1]]
}(~isv)/pl6
l { 1,h[2]R0Xc { h[1]
pl4:l { (lXhsXc#0)S1,h[2]R0
l[1+(d#0)/b[;1]] { (d#0)/d { (c=b[;y])S.Xy
}(c#0)/pl5
l { lS0=(sm[2]%2)|0,Ih[2]
pl5: pt[((Rpt)[1],1+c%sm[1])[1+0=sm[1]|c];],(' |',(Ry)Rpc)[1+l]
}(0$c { c-1)/pl4
}(u=u { sm[2]-~isv { ~RRnb { ,hz)/pl3
pl6:(sm[2]-9)O|(,(0 0 ,(u-1)R1)\pt),' '
xpl3: }(st[1 3 2 4],1)/1 3 5 7 10 + xpl3
'origin and scale factor for ordinate: ',NJg[1],%f[1]
}(0=st[3])/xpl4
'scale factor for ordinate: ',NJ10*st[5]-1
xpl4: }(0=st[2])/xpl5
'origin and scale factor for abscissa: ',NJg[2]%f[2]
xpl5: }(0=st[4])/0
'scale factor for abscissa: ',NJ10*st[6]-1
}0
pl7: 'the right argument of plot must have rank $ 3.'
hssm$A Bxx$BC
vsm { a vs b
}((1<RRb)V2<RRa)Ul1
'an argument of vs is of improper rank'
}0
l1:b{(((1Y(Ra),1),Rb)[(BN29)+1#Rb],1)Rb{,b
m { (1,Rm)Rm{b,a

andr { a and b
r { a,((Rb),1)Rb
pcO*JGHL	describe3sc'type ''describe'' for details'edtxt edtxt;fd;name;vr;r
L'{'variable name? '
name { L'
fd { 390 Lcreat 'apltxt.tmp'
}(fd < 0)/error
r  { fd Lwrite BJ name
fd { Lclose fd
Lrun 'xed apltxt.tmp'
fd { 260 Lopen 'apltxt.tmp'
}(fd<0)/error
vr { ''
more: vr { vr,r { fd Lread 256
} (0#Rr)/more
fd { Lclose fd
r { BJ name,' { vr'
Lrun 'rm apltxt.tmp'
}0
error: 'Can''t open file: apltxt.tmp'
Llx-  type describe for details