;+ ; @file_comments ; ; ; @categories ; ; ; @param TAB1 ; ; ; @param TAB2 ; ; ; @param MIN1 ; ; ; @param MAX1 ; ; ; @param MIN2 ; ; ; @param MAX2 ; ; ; @param VARNAME2 ; ; ; @keyword BOXZOOM ; Vector indicating the geographic zone on which we want to cut the map. ; If BOXZOOM has : ; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] ; 2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] ; 4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] ; 5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] ; 6 elements: The extraction is made on Boxzoom ; ; @keyword COL1D ; ; ; @keyword STY1D ; ; ; @keyword OV1D ; ; ; @keyword _EXTRA ; Used to pass your keywords ; ; @returns ; ; ; @uses ; ; ; @restrictions ; ; ; @examples ; ; ; @history ; ; ; @version ; $Id$ ; ; @todo seb ; ;- ; PRO pltsc,tab1,tab2, min1, max1, min2, max2, varname2, BOXZOOM = boxzoom, $ COL1D=col1d,STY1D=sty1d,OV1D=ov1d, _extra = ex ; scatter plot (inspired from plt1d) ; ; compile_opt idl2, strictarrsubs ; ;--------------------------------------------------------- ; include common @cm_4mesh @cm_4data IF NOT keyword_set(key_forgetold) THEN BEGIN @updatenew @updatekwd ENDIF ;-------------------------------------------------------------- ; Comment: We do not reinitializate when we call back pltsc if NOT keyword_set(ov1d) then reinitplt ;; reduce data xyzt domain if keyword_set(boxzoom) then BEGIN Case 1 Of N_Elements(Boxzoom) Eq 1:bte = [lon1, lon2, lat1, lat2, 0., boxzoom[0]] N_Elements(Boxzoom) Eq 2:bte = [lon1, lon2, lat1, lat2, boxzoom[0], boxzoom[1]] N_Elements(Boxzoom) Eq 4:bte = [Boxzoom, vert1, vert2] N_Elements(Boxzoom) Eq 5:bte = [Boxzoom[0:3], 0, Boxzoom[4]] N_Elements(Boxzoom) Eq 6:bte = Boxzoom Else: Begin ras = report('Wrong Definition of Boxzoom') return End endcase savedbox = 1b saveboxparam, 'boxparam4pltsc.dat' domdef, bte, GRIDTYPE = vargrid ENDIF ; extract indexes to plot indexm = where(tab1 LE valmask/10.) tab1 = tab1[indexm] tab2 = tab2[indexm] npts = (size(indexm))[1] ; deal with min and max of plot IF finite(min1) EQ 0 THEN min1 = min(tab1) IF finite(max1) EQ 0 THEN max1 = max(tab1) IF finite(min2) EQ 0 THEN min2 = min(tab2) IF finite(max2) EQ 0 THEN max2 = max(tab2) ; init plot if not overlay IF NOT keyword_set(ov1d) THEN placedessin, 'yfx', posfenetre, posbar, $ contour = contour, _extra = ex yy = tab1 xx = tab2 ; axis range !x.range = [min2-abs(max2-min2)/5.,max2+abs(max2-min2)/5.] !y.range = [min1-abs(max1-min1)/5.,max1+abs(max1-min1)/5.] IF (NOT keyword_set(sty1d)) THEN sty1d = 0 IF (NOT keyword_set(col1d)) THEN col1d = 0 IF NOT keyword_set(ov1d) THEN BEGIN legende, min1, max1, 'yfx', VARNAME2 = varname2, NPTS = npts, _EXTRA = ex ; plot,xx,yy, background = 255, psym = sty1d+1, color=col1d, thick=2 $ , title = '', subtitle = '',_extra = ex if n_elements(ex) NE 0 then BEGIN ; To have a 0 colored frame and trace a line at y=0 if (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 then ex.COLOR = 0 if (where(tag_names(ex) EQ 'LINESTYLE'))[0] NE -1 then ex.LINESTYLE= 0 ENDIF plot, !x.range, [0, 0], /noerase, /nodata, xstyle = 1, ystyle = 1, _extra = ex ; trace a line at x=0 plot, [0, 0], !y.range, /noerase, /nodata, title = '', subtitle = '', _extra = ex ENDIF ELSE oplot,xx,yy,color=col1d,linestyle=sty1d,thick=2, _extra = ex ;------------------------------------------------------------ ;------------------------------------------------------------ ; 3rd part: Possible print ;------------------------------------------------------------ ;------------------------------------------------------------ fini: terminedessin, _extra = ex if keyword_set(savedbox) THEN restoreboxparam, 'boxparam4pltsc.dat' ;------------------------------------------------------------ if n_elements(key_performance) NE 0 then $ IF key_performance EQ 1 THEN print, 'temps plt1d', systime(1)-tempsun ;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ return end