Commit daef5684a9cdfe389961a5e1be4d2f798a13bde6
1 parent
5f64a4bb
Exists in
master
removed redundant routines from idl_misc
Showing
1 changed file
with
0 additions
and
137 deletions
Show diff stats
src/idl_misc/err_bar.pro deleted
... | ... | @@ -1,137 +0,0 @@ |
1 | -PRO err_bar,x,y,xrms=xrms,yrms=yrms,linestyle=linestyle,xbar=xbar,ybar=ybar, $ | |
2 | - color=color | |
3 | - | |
4 | -;+ | |
5 | -; NAME: | |
6 | -; err_bar | |
7 | -; CALLING SEQUENCE: | |
8 | -; err_bar,x,y | |
9 | -; PURPOSE: | |
10 | -; overplot x and/or y error bars od size dx and dy | |
11 | -; INPUTS: | |
12 | -; x,y =points where errors must be plotted | |
13 | -; OPTIONAL INPUT: | |
14 | -; xrms,yrms = errors (will plot x+-xrms/2., y+-yrms/2.) | |
15 | -; linestyle = line style for error bars (default=0) | |
16 | -; xbar,ybar = size of the little bars (% of range) | |
17 | -; OUTPUTS: | |
18 | -; None | |
19 | -; PROCEDURE AND SUBROUTINE USED | |
20 | -; Straightforwrd | |
21 | -; SIDE EFFECTS: | |
22 | -; None | |
23 | -; MODIFICATION HISTORY: | |
24 | -; written JPB Jan-94 | |
25 | -;- | |
26 | - | |
27 | -;on_error,2 | |
28 | - | |
29 | -IF N_PARAMS(0) NE 2 THEN BEGIN | |
30 | - print,'err_bar,x,y' | |
31 | - print,'Accepted Key-Words: [,xrms=][,yrms=][,linestyle=]' | |
32 | - print,' [xbar=][ybar=][color=color]' | |
33 | - print,'Will plot x+-xrms/2.' | |
34 | - print,'xbar & ybar in % of the range' | |
35 | - GOTO,sortie | |
36 | -ENDIF | |
37 | - | |
38 | -IF !x.type EQ 1 THEN xrg=10^!x.crange | |
39 | -IF !x.type EQ 0 THEN xrg=!x.crange | |
40 | -IF !y.type EQ 1 THEN yrg=10^!y.crange | |
41 | -IF !y.type EQ 0 THEN yrg=!y.crange | |
42 | - | |
43 | -IF not keyword_set(xrms) AND not keyword_set(yrms) THEN BEGIN | |
44 | - print,'One of xrms or yrms must be set' | |
45 | - goto,sortie | |
46 | -ENDIF | |
47 | -sty=0 | |
48 | -IF keyword_set(linestyle) NE 0 THEN BEGIN | |
49 | - sty=linestyle | |
50 | -ENDIF | |
51 | - | |
52 | -si=size(x) | |
53 | -npt=si(1) | |
54 | - | |
55 | -old_psym=!psym | |
56 | -!psym=0 | |
57 | - | |
58 | -xmax=!x.crange(1) | |
59 | -xmin=!x.crange(0) | |
60 | -IF !x.type EQ 0 THEN BEGIN ;for linear plots | |
61 | - xrange=xmax-xmin | |
62 | - IF keyword_set(xbar) EQ 0 THEN BEGIN | |
63 | - epsx=xrange/50. | |
64 | - ENDIF ELSE BEGIN | |
65 | - epsx=xbar/100.*xrange | |
66 | - ENDELSE | |
67 | -ENDIF ELSE BEGIN ;for log | |
68 | - xrange=xmax-xmin | |
69 | - IF keyword_set(xbar) EQ 0 THEN BEGIN | |
70 | - epsx=x*xrange/50. | |
71 | - ENDIF ELSE BEGIN | |
72 | - epsx=x*xbar/100.*xrange | |
73 | -; epsx=10^(x*xbar/100.*xrange) | |
74 | - ENDELSE | |
75 | -ENDELSE | |
76 | - | |
77 | -ymax=!y.crange(1) | |
78 | -ymin=!y.crange(0) | |
79 | -yrange=ymax-ymin | |
80 | -IF !y.type EQ 0 THEN BEGIN | |
81 | - IF keyword_set(ybar) EQ 0 THEN BEGIN | |
82 | - epsy=yrange/50. | |
83 | - ENDIF ELSE BEGIN | |
84 | - epsy=ybar/100.*yrange | |
85 | - ENDELSE | |
86 | -ENDIF ELSE BEGIN | |
87 | - IF keyword_set(ybar) EQ 0 THEN BEGIN | |
88 | - epsy=y*yrange/50. | |
89 | - ENDIF ELSE BEGIN | |
90 | - epsy=y*ybar/100.*yrange | |
91 | - ENDELSE | |
92 | -ENDELSE | |
93 | - | |
94 | -for j=0,npt-1 do begin | |
95 | - IF keyword_set(xrms) NE 0 THEN BEGIN | |
96 | - errbarx=[x(j)-xrms(j)/2.,x(j)+xrms(j)/2.] | |
97 | - errbary=[y(j),y(j)] | |
98 | - IF errbarx(0) LT 0 then errbarx(0)=xrg(0) | |
99 | - IF errbarx(1) GT xrg(1) then errbarx(1)=xrg(1) | |
100 | - oplot,errbarx,errbary,linestyle=sty,color=color | |
101 | - IF !y.type EQ 0 THEN BEGIN | |
102 | - eps=epsy | |
103 | - ENDIF ELSE BEGIN | |
104 | - eps=epsy(j) | |
105 | - ENDELSE | |
106 | - bout1x=[x(j)-xrms(j)/2.,x(j)-xrms(j)/2.] | |
107 | - bout1y=[y(j)-eps,y(j)+eps] | |
108 | - oplot,bout1x,bout1y,linestyle=sty,color=color | |
109 | - bout1x=[x(j)+xrms(j)/2.,x(j)+xrms(j)/2.] | |
110 | - bout1y=[y(j)-eps,y(j)+eps] | |
111 | - oplot,bout1x,bout1y,linestyle=sty,color=color | |
112 | - ENDIF | |
113 | - IF keyword_set(yrms) NE 0 THEN BEGIN | |
114 | - errbarx=[x(j),x(j)] | |
115 | - errbary=[y(j)-yrms(j)/2.,y(j)+yrms(j)/2.] | |
116 | - IF errbary(0) LT 0 then errbary(0)=yrg(0) | |
117 | - IF errbary(1) GT yrg(1) then errbary(1)=yrg(1) | |
118 | - oplot,errbarx,errbary,linestyle=sty,color=color | |
119 | - IF !x.type EQ 0 THEN BEGIN | |
120 | - eps=epsx | |
121 | - ENDIF ELSE BEGIN | |
122 | - eps=epsx(j) | |
123 | - ENDELSE | |
124 | - bout1x=[x(j)-eps,x(j)+eps] | |
125 | - bout1y=[y(j)-yrms(j)/2.,y(j)-yrms(j)/2.] | |
126 | - oplot,bout1x,bout1y,linestyle=sty,color=color | |
127 | - bout1x=[x(j)-eps,x(j)+eps] | |
128 | - bout1y=[y(j)+yrms(j)/2.,y(j)+yrms(j)/2.] | |
129 | - oplot,bout1x,bout1y,linestyle=sty,color=color | |
130 | - ENDIF | |
131 | -ENDFOR | |
132 | - | |
133 | -!psym=old_psym | |
134 | - | |
135 | -sortie: | |
136 | -END | |
137 | - |