subroutine yaxright(yax_l,yax_r,ny,ynum,nynum,form,int,fcode,lab, + rofftoax,rchsize) c c Draw extra right-hand axis: c real yax_l(ny),yax_r(ny),ynum(nynum),yval(nynum) character*(*) form,lab,fcode(nynum) character*32 labnum data ticlen/.012/, spval/1.e36/ c c Offset from existing right axis to new right axis is given in normalized c coords. Set offsets to numeric labels and axis info label: c offtoax = .015 if (rofftoax.gt.0.) offtoax = rofftoax offtolab = offtoax+.09 offtonum = offtoax+.02 chsize = .014 if (rchsize.gt.0.) chsize = rchsize c c write(6,"('yaxright: ny=',i3,' yax_l=',/(6e12.4))") ny,yax_l c write(6,"('yaxright: ny=',i3,' yax_r=',/(6e12.4))") ny,yax_r c write(6,"('yaxright: nynum=',i3,' ynum=',/(6e12.4))") nynum, c + ynum c c Find left axis values at desired new right axis numeric labels: c subroutine vecterp(fy,f,ny,fylin,flin,nlin,spval,iprnt) c call vecterp(yax_r,yax_l,ny,ynum,yval,nynum,spval,0) c c Get into normalized coords: c call getset(vl,vr,vb,vt,wl,wr,wb,wt,lty) call set(0.,1.,0.,1.,0.,1.,0.,1.,1) c c Draw the axis: c xpos = vr+offtoax call line(xpos,vb,xpos,vt) c c Draw numeric labels, tics, and info label: c do k=1,nynum if (yval(k).eq.spval) goto 100 ypos = vb + (vt-vb)*(yval(k)-yax_l(1))/(yax_l(ny)-yax_l(1)) if (ypos.gt.vt.or.ypos.lt.vb) goto 100 call line(xpos,ypos,xpos+ticlen,ypos) ! tic mark if (lenstr(form).gt.0) then if (int.gt.0) then ! form is for integers write(labnum,form) ifix(ynum(k)) else write(labnum,form) ynum(k) endif call plchmq(vr+offtonum,ypos,labnum(1:lenstr(labnum)), + chsize,0.,-1.) else call plchhq(vr+offtonum,ypos,fcode(k)(1:lenstr(fcode(k))), + chsize,0.,-1.) endif 100 continue call plchmq(vr+offtolab,0.5*(vt+vb),lab,chsize,90.,0.) enddo c c Restore original set: c call set(vl,vr,vb,vt,wl,wr,wb,wt,lty) return end