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 errors(input,istart,nin,x,y,z,n,h,*) 00021 save 00022 c 00023 c Add error bars from z: 00024 c 00025 character*(*) input 00026 dimension x(1),y(1),z(1) 00027 c 00028 common/scales/xl,xr,dinchx,ybot,ytop,dinchy,rlen,slen 00029 c 00030 c Decide on the direction of the bars: 00031 c 00032 idir = 0 00033 do 162 i=istart,nin 00034 if (input(i:i).gt.' ') then 00035 if (input(i:i).eq.'x' 00036 & .or.input(i:i).eq.'1') then 00037 idir = 1 00038 else if (input(i:i).eq.'y' 00039 & .or.input(i:i).eq.'2') then 00040 idir = 2 00041 end if 00042 go to 10162 00043 end if 00044 162 continue 00045 c 00046 10162 if (idir.eq.0) go to 1001 00047 istart = i + 1 00048 c 00049 c Draw the bars. 00050 c 00051 call readiq(input(istart:nin),1, 00052 & iside,idum,idum,idum,*1001) 00053 c 00054 c Point size h is specified in screen units. 00055 c Allow an additional 10% to improve appearance. 00056 c 00057 if (idir.eq.1) then 00058 pt_size = 0.55*h/dinchx 00059 else 00060 pt_size = 0.55*h/dinchy 00061 end if 00062 c 00063 do 10562 i=1,n 00064 if (abs(z(i)).gt.pt_size) then 00065 00066 if (abs(iside).eq.1) then 00067 c 00068 c One-sided: 00069 c 00070 if (idir.eq.1) then 00071 call axerr(x(i),y(i),iside*z(i)) 00072 else 00073 call ayerr(x(i),y(i),iside*z(i)) 00074 end if 00075 else if (iside.eq.2) then 00076 c 00077 c Two-sided: 00078 c 00079 if (idir.eq.1) then 00080 call xerr(x(i),y(i),z(i)) 00081 else 00082 call yerr(x(i),y(i),z(i)) 00083 end if 00084 else 00085 go to 1001 00086 end if 00087 00088 end if 00089 10562 continue 00090 c 00091 return 00092 1001 return 1 00093 c 00094 end