c subroutine mkcon(f,i0,i1,cint,xlab,ylab,title) c c Make simple contour with axes labels and title: c real f(i0,i1),vp(4) character*(*) xlab,ylab,title character*100 iltext parameter(lrwk=2000,liwk=1000,liama=30000) real rwrk(lrwk) integer iwrk(liwk),iama(liama) data vp/.1,.9,.1,.9/ external drwcl c c Set viewport: c call cpsetr('VPL - viewport left' ,vp(1)) call cpsetr('VPR - viewport right' ,vp(2)) call cpsetr('VPB - viewport bottom',vp(3)) call cpsetr('VPT - viewport top' ,vp(4)) call cpsetr('VPS - viewport shape' ,0.) c c Set contour line labels: c call cpseti('LLP - line label positioning',2) call cpsetr('LLS - line label char size',.018) call cpseti('LLO - line label orientation',1) call cpsetr('HLS - high-low label char size',.022) c c Set info-label (save current text string, and restore at end): c call cpgetc('ILT - info label text string',iltext) call cpsetc('ILT - info label text string', + 'CONTOUR FROM $CMN$ TO $CMX$ BY $CIU$') call cpsetr('ILS - info label char size',.018) call cpseti('ILP - info label positioning',0) call cpsetr('ILX - info label x-coord',0.5*(vp(1)+vp(2))) call cpsetr('ILY - info label y-coord',-.096) c c Set contour interval and init conpack: c if (cint.gt.0.) call cpsetr('CIS',cint) call cprect(f,i0,i0,i1,rwrk,lrwk,iwrk,liwk) call cppkcl(f,rwrk,iwrk) call cpgeti('NCL -- number of contour levels',ncl) c c Dashed lines for negative values: c do i=1,ncl call cpseti('PAI -- parameter array index',i) call cpgetr('CLV -- contour level',clev) if (clev.lt.0.) + call cpsetc('CLD -- contour line dash pattern', + '$$$''''$$$''''') enddo c c Use area map to mask contour line labels: c call arinam(iama,liama) call cplbam(f,rwrk,iwrk,iama) call cpcldm(f,rwrk,iwrk,iama,drwcl) call cplbdr(f,rwrk,iwrk) call cpback(f,rwrk,iwrk) c c Put title at top: c call getset(vl,vr,vb,vt,wl,wr,wb,wt,ll) size = amin1(.5*(1.-vt),.017) offset = .023 y = amin1((1.+vt)/2.+offset, offset+vt) call set(0.,1.,0.,1.,0.,1.,0.,1.,1) call plchhq(.5,y,title(1:lenstr(title)),size,0.,0.) c c Axis labels: c call plchhq(.5*(vl+vr),vb-offset,xlab(1:lenstr(xlab)), + size,0.,0.) call plchhq(vl-offset,.5*(vb+vt),ylab(1:lenstr(ylab)), + size,90.,0.) c c Restore set and call frame: c call set(vl,vr,vb,vt,wl,wr,wb,wt,ll) call frame call cpsetc('ILT info label text string',iltext) return end c c Contour line draw routine: c subroutine drwcl(xcs,ycs,ncs,iai,iag,nai) dimension xcs(*),ycs(*),iai(*),iag(*) idr=1 do i=1,nai if (iai(i).lt.0) idr=0 enddo if (idr.ne.0) call curved(xcs,ycs,ncs) return end