00001
00002 c
00003 c Copyright (c) 1986,1987,1988,1989,1990,1991,1992,1993,
00004 c by Steve McMillan, Drexel University, Philadelphia, PA.
00005 c
00006 c All rights reserved.
00007 c
00008 c Redistribution and use in source and binary forms are permitted
00009 c provided that the above copyright notice and this paragraph are
00010 c duplicated in all such forms and that any documentation,
00011 c advertising materials, and other materials related to such
00012 c distribution and use acknowledge that the software was developed
00013 c by the author named above.
00014 c
00015 c THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
00016 c IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
00017 c WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00018 c
00019
00020 subroutine xyplot(input,istart,nin,x,y,z,n,
00021 & itype,jth,jsym,plot_symbol,hp,*)
00022 save
00023 c
00024 c Plot y(x).
00025 c
00026 character*(*) input
00027 dimension x(1),y(1),z(1)
00028 character*1 plot_symbol
00029 c
00030 save i1plot,i2plot
00031 c
00032 icplot = 0
00033 go to 1
00034 c
00035 entry xyplotc(input,istart,nin,x,y,z,n,
00036 & itype,jth,jsym,plot_symbol,hp,*)
00037 icplot = 1
00038 c
00039 1 if (input(2:2).ne.'x') then
00040 i1plot = 1
00041 i2plot = n
00042 call readiq(input(istart:nin),2,
00043 & i1plot,i2plot,idum,idum,*1001)
00044 else
00045 x1 = -1.e30
00046 x2 = 1.e30
00047 call readrq(input(istart:nin),2,
00048 & x1,x2,dum,dum,*1001)
00049 xx1 = min(x1,x2)
00050 x2 = max(x1,x2)
00051 x1 = xx1
00052 i1plot = 0
00053 do i=1,n
00054 if (i1plot.eq.0.and.x(i).ge.x1) i1plot = i
00055 if (x(i).gt.x2) then
00056 i2plot = i-1
00057 go to 11301
00058 end if
00059 end do
00060 11301 continue
00061 c write(6,*)'x1, x2 = ',x1, x2
00062 c write(6,*)'i1, i2 = ',i1plot,i2plot
00063 end if
00064 c
00065 i1plot = max(1,min(n,i1plot))
00066 i2plot = max(i1,min(n,i2plot))
00067 c write(6,*)'i1, i2 = ',i1plot,i2plot
00068 c
00069 entry unplot(x,y,z,n,itype,jth,jsym,plot_symbol,hp)
00070 c
00071 c Note that this entry inherits the previous i1plot, i2plot!
00072 c
00073 call devon
00074 nnplot = i2plot - i1plot + 1
00075 if (nnplot.le.0) go to 1001
00076 c
00077 301 if (plot_symbol.ne.' ') then
00078 c
00079 c Encode the symbol.
00080 c
00081 if (plot_symbol.eq.'#') then
00082 js = -1
00083 else
00084 js = -ichar(plot_symbol)
00085 end if
00086 else
00087 js = abs(jsym)
00088 end if
00089 c
00090 if (itype.eq.0) then
00091 if (icplot.eq.0) then
00092 call mline(x(i1plot),y(i1plot),nnplot,jth,js,hp)
00093 else
00094 call mlinec(x(i1plot),y(i1plot),z(i1plot),
00095 & nnplot,jth,js,hp)
00096 end if
00097 else
00098 if (icplot.eq.0) then
00099 call dline(x(i1plot),y(i1plot),nnplot,jth,js,hp)
00100 else
00101 call dlinec(x(i1plot),y(i1plot),z(i1plot),
00102 & nnplot,jth,js,hp)
00103 end if
00104 end if
00105 c
00106 return
00107 1001 return 1
00108 c
00109 end