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