source: trunk/procs/saxo_mods/pltsc.pro @ 27

Last change on this file since 27 was 2, checked in by post_it, 17 years ago

Initial import from ~/POST_IT/

File size: 3.5 KB
Line 
1PRO  pltsc,tab1,tab2, min1, max1, min2, max2, varname2, BOITE = boite, $
2           COL1D=col1d,STY1D=sty1d,OV1D=ov1d,THICKN = thickn, FRACTION = fraction, _extra = ex
3;
4; scatter plot (inspired from plt1d)
5;
6
7@common
8
9c_cote = 0
10
11; Rq: on ne reinitialise pas qd on rapelle pltsc
12   IF NOT keyword_set(ov1d) THEN reinitplt
13   IF NOT keyword_set(thickn) THEN thickn = 2
14   IF NOT keyword_set(fraction) THEN fraction = 1.
15   ;; reduce data xyzt domain
16
17   oldboite = [lon1, lon2, lat1, lat2, prof1, prof2]
18   IF keyword_set(boite) THEN BEGIN
19      IF n_elements(integration3d) EQ 0 THEN integration3d = n_elements(boite) NE 4
20      CASE 1 Of
21         N_Elements(Boite) Eq 1:bte=[lon1, lon2, lat1, lat2, 0.,boite[0]]
22         N_Elements(Boite) Eq 2:bte=[lon1, lon2, lat1, lat2, boite[0],boite[1]]
23         N_Elements(Boite) Eq 4:bte=[Boite, prof1, prof2]
24         N_Elements(Boite) Eq 5:bte=[Boite[0:3], 0, Boite[4]]
25         N_Elements(Boite) Eq 6:bte=Boite
26         ELSE: BEGIN
27            ras = report('Mauvaise Definition de Boite')
28            return
29         END
30      ENDCASE
31   ENDIF ELSE  bte=[lon1, lon2, lat1, lat2, prof1, prof2]
32
33   domdef, bte,GRILLE=vargrid
34
35; extract indexes to plot
36
37   indexm = where(tab1 LE valmask/10.)
38   tab1 = tab1[indexm]
39   tab2 = tab2[indexm]
40
41   npts = (size(indexm))[1]
42
43; deal with  min and max of plot
44   IF finite(min1) EQ 0 THEN min1 = min(tab1)
45   IF finite(max1) EQ 0 THEN max1 = max(tab1)
46   IF finite(min2) EQ 0 THEN min2 = min(tab2)
47   IF finite(max2) EQ 0 THEN max2 = max(tab2)
48   
49
50; init plot if not overlay
51   
52   IF NOT keyword_set(ov1d) THEN placedessin, 'yfx', posfenetre, posbar, $
53    contour = contour, _extra = ex
54   yy = tab1
55   xx = tab2
56
57; axis range
58
59   fraction = 0.
60
61   !x.range = [min2-fraction*abs(max2-min2)/5.,max2+fraction*abs(max2-min2)/5.]
62   !y.range = [min1-fraction*abs(max1-min1)/5.,max1+fraction*abs(max1-min1)/5.]
63
64   IF (NOT keyword_set(sty1d)) THEN sty1d = 0
65   IF (NOT keyword_set(col1d)) THEN col1d = 0
66   IF  NOT keyword_set(ov1d) THEN  BEGIN
67      legende, min1, max1, 'yfx', VARNAME2 = varname2, NPTS = npts, _EXTRA = ex
68;
69      plot,xx,yy, background = 255, psym = sty1d+1, color=col1d, thick=thickn $
70       , title = '', subtitle = '',_extra = ex
71
72      IF n_elements(ex) NE 0 THEN BEGIN
73; pour avoir un cadre de la couleur c_cote et trace une ligne a y=0
74         IF (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 THEN ex.COLOR = c_cote
75         IF (where(tag_names(ex) EQ 'LINESTYLE'))[0] NE -1 THEN ex.LINESTYLE= 0
76      ENDIF
77      plot, !x.range, [0, 0],/noerase,color=c_cote, xstyle = 1, ystyle = 1, _extra = ex
78; trace une ligne a x=0
79      plot, [0, 0],!y.range ,/noerase,color=c_cote, title = '', subtitle = '', _extra = ex
80   ENDIF ELSE oplot,xx,yy,color=col1d,psym=sty1d+1,thick=thickn, _extra = ex
81;------------------------------------------------------------
82;------------------------------------------------------------
83; 3eme partie: impression eventuelle
84;------------------------------------------------------------
85;------------------------------------------------------------
86fini:
87   domdef, oldboite,GRILLE=vargrid
88   terminedessin, _extra = ex
89;------------------------------------------------------------
90   IF n_elements(key_performance) NE 0 THEN $
91    IF key_performance EQ 1 THEN print, 'temps plt1d', systime(1)-tempsun
92;------------------------------------------------------------
93;------------------------------------------------------------
94;------------------------------------------------------------
95   return
96END
97
98
Note: See TracBrowser for help on using the repository browser.