subroutine xyplot(x,y,z) real*8 amat,xpel,ypel,expel,eldat,zlast,x,y,z common /gplot/igplot,idev,ndispl common /opname/noptype(4) include 'input.inc' character*59 orbfile character*3 ans character*1 a,b,c,d character*1 label(4) dimension lstype(4) dimension nlabel(4),xs(2),ys(2) equivalence (a,nlabel(1)),(b,nlabel(2)),(c,nlabel(3)),(d,nlabel(4)) dimension xx(2000),yy(2000),zz(2000) data nn/0/,zlast/0.0d0/,nfirst/0/ data iopen/0/ c c check for start of new plot if(z-zlast.gt.-4.87)goto 202 if(nn.eq.0)return new=0 do 200 i=1,4 if(noptype(i).eq.lstype(i))goto 200 lstype(i)=noptype(i) new=1 200 continue if(iopen.eq.0.and.nn.gt.0)then do i=1,72 if(filename(i:i).ne.' '.and.istart.eq.0)istart=i if(filename(i:i).eq.' '.and.istart.ne.0)then iend=i-1 goto 1727 endif end do 1727 continue iopen=1 orbfile=filename(istart:iend)//'_orbit' open(unit=76,file=orbfile,type='new') type 909,filename(istart:iend)//'_orbit' 909 format(1x,' Open file ',a,' to write closed orbit data.') endif if(nn.gt.0)then write(76,209) 209 format('#','Element',' z ',' x ',' y ') do i=1,nn write(76,208)i,zz(i),xx(i),yy(i) !write to file end do 208 format(1x,i8,3f12.7) endif nn=0 return 202 zlast=z nn=1+nn xx(nn)=x yy(nn)=y zz(nn)=z return end