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 errbars(xc,yc,dx,dy)
00021 save
00022 c
00023 c Draw error bars centered on (xc,yc), of length(s)
00024 c dx and/or dy, all measured in user units.
00025 c
00026 common/scales/xl,xr,dinchx,ybot,ytop,dinchy,rlen,slen
00027 c
00028 data cap/.07/
00029 c
00030 iboth=1
00031 go to 10
00032 c
00033 entry xerr(xc,yc,dx)
00034 c
00035 iboth=-1
00036 10 rc=(xc-xl)*dinchx
00037 sc=(yc-ybot)*dinchy
00038 dr=dx*dinchx
00039 c
00040 c *** horizontal bar ***
00041 c
00042 call plotin(rc-dr,sc,3)
00043 call plotin(rc+dr,sc,2)
00044 r=rc-dr
00045 call plotin(r,sc-cap,3)
00046 call plotin(r,sc+cap,2)
00047 r=rc+dr
00048 call plotin(r,sc-cap,3)
00049 call plotin(r,sc+cap,2)
00050 if(iboth.lt.0)return
00051 go to 20
00052 c
00053 entry yerr(xc,yc,dy)
00054 c
00055 rc=(xc-xl)*dinchx
00056 sc=(yc-ybot)*dinchy
00057 20 ds=dy*dinchy
00058 c
00059 c *** vertical bars ***
00060 c
00061 call plotin(rc,sc-ds,3)
00062 call plotin(rc,sc+ds,2)
00063 s=sc-ds
00064 call plotin(rc-cap,s,3)
00065 call plotin(rc+cap,s,2)
00066 s=sc+ds
00067 call plotin(rc-cap,s,3)
00068 call plotin(rc+cap,s,2)
00069 c
00070 return
00071 c
00072 entry setercap(size)
00073 cap = size
00074 c
00075 end