source: trunk/ToBeReviewed/PLOTS/DESSINE/pltsc.pro @ 35

Last change on this file since 35 was 35, checked in by pinsard, 18 years ago

upgrade of PLOTS/DESSINE according to cerbere.lodyc.jussieu.fr: /usr/home/smasson/SAXO_RD/ : files

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1PRO  pltsc,tab1,tab2, min1, max1, min2, max2, varname2, BOXZOOM = boxzoom, $
2           COL1D=col1d,STY1D=sty1d,OV1D=ov1d, _extra = ex
3;
4; scatter plot (inspired from plt1d)
5;
6
7;---------------------------------------------------------
8; include common
9@cm_4mesh
10@cm_4data
11  IF NOT keyword_set(key_forgetold) THEN BEGIN
12@updatenew
13@updatekwd
14  ENDIF
15;--------------------------------------------------------------
16
17; Rq: on ne reinitialise pas qd on rapelle pltsc
18   if NOT keyword_set(ov1d) then reinitplt
19   ;; reduce data xyzt domain
20
21   if keyword_set(boxzoom) then BEGIN
22     Case 1 Of
23       N_Elements(Boxzoom) Eq 1:bte = [lon1, lon2, lat1, lat2, 0., boxzoom[0]]
24       N_Elements(Boxzoom) Eq 2:bte = [lon1, lon2, lat1, lat2, boxzoom[0], boxzoom[1]]
25       N_Elements(Boxzoom) Eq 4:bte = [Boxzoom, vert1, vert2]
26       N_Elements(Boxzoom) Eq 5:bte = [Boxzoom[0:3], 0, Boxzoom[4]]
27       N_Elements(Boxzoom) Eq 6:bte = Boxzoom
28       Else: Begin
29         ras = report('Wrong Definition of Boxzoom')
30         return
31       End
32     endcase
33     savedbox = 1b
34     saveboxparam, 'boxparam4pltsc.dat'
35     domdef, bte, GRIDTYPE = vargrid
36   ENDIF
37
38; extract indexes to plot
39
40   indexm = where(tab1 LE valmask/10.)
41   tab1 = tab1[indexm]
42   tab2 = tab2[indexm]
43
44   npts = (size(indexm))[1]
45
46; deal with  min and max of plot
47   IF finite(min1) EQ 0 THEN min1 = min(tab1)
48   IF finite(max1) EQ 0 THEN max1 = max(tab1)
49   IF finite(min2) EQ 0 THEN min2 = min(tab2)
50   IF finite(max2) EQ 0 THEN max2 = max(tab2)
51   
52
53; init plot if not overlay
54   
55   IF NOT keyword_set(ov1d) THEN placedessin, 'yfx', posfenetre, posbar, $
56    contour = contour, _extra = ex
57   yy = tab1
58   xx = tab2
59
60; axis range
61   !x.range = [min2-abs(max2-min2)/5.,max2+abs(max2-min2)/5.]
62   !y.range = [min1-abs(max1-min1)/5.,max1+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=2 $
70       , title = '', subtitle = '',_extra = ex
71
72      if n_elements(ex) NE 0 then BEGIN
73; pour avoir un cadre de la couleur 0 et trace une ligne a y=0
74         if (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 then ex.COLOR = 0
75         if (where(tag_names(ex) EQ 'LINESTYLE'))[0] NE -1 then ex.LINESTYLE= 0
76       ENDIF
77       plot, !x.range, [0, 0], /noerase, /nodata, xstyle = 1, ystyle = 1, _extra = ex
78; trace une ligne a x=0
79      plot, [0, 0], !y.range, /noerase, /nodata, title = '', subtitle = '', _extra = ex
80   ENDIF ELSE oplot,xx,yy,color=col1d,linestyle=sty1d,thick=2, _extra = ex
81;------------------------------------------------------------
82;------------------------------------------------------------
83; 3eme partie: impression eventuelle
84;------------------------------------------------------------
85;------------------------------------------------------------
86fini:
87   terminedessin, _extra = ex
88  if keyword_set(savedbox) THEN restoreboxparam, 'boxparam4pltsc.dat'
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.