Changeset 231 for trunk/SRC/ToBeReviewed/PLOTS/DESSINE
- Timestamp:
- 03/19/07 18:15:51 (17 years ago)
- Location:
- trunk/SRC/ToBeReviewed/PLOTS/DESSINE
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/plt.pro
r171 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments 3 ; @file_comments 7 4 ; Draw horizontal graph (map) with CONTOUR procedure 8 5 ; 9 ; @categories 6 ; @categories 10 7 ; Graphics 11 8 ; 12 ; @param TAB1 {in}{required} 9 ; @param TAB1 {in}{required} 13 10 ; The field whose we want to make the horizontal map can be: 14 11 ; 1) an array. if needed, its mean along the z and t direction 15 12 ; will be automatically performed. 16 13 ; 2) a structure respecting all criterions specified by 17 ; litchamp.pro.cf. IDL> xhelp,'litchamp'18 ; 19 ; @param PARAM2 {in}{optional}{default=min of tab1 (on ocean points)} 14 ; <pro>litchamp</pro> cf. IDL> xhelp,'litchamp' 15 ; 16 ; @param PARAM2 {in}{optional}{default=min of tab1 (on ocean points)} 20 17 ; Min value we want to consider in the contour's drawing. 21 18 ; Note: Could also be the type of plot that can be only 'xy' for plt 22 19 ; 23 ; @param PARAM3 {in}{optional}{default=max of tab1 (on ocean points)} 20 ; @param PARAM3 {in}{optional}{default=max of tab1 (on ocean points)} 24 21 ; Max value we want to consider in the contour's drawing. 25 22 ; Note: if param2 is defined as 'xy' then param3 is used to define the min (see param2) 26 23 ; 27 ; @param PARAM4 {in}{optional}{default='xy'} 24 ; @param PARAM4 {in}{optional}{default='xy'} 28 25 ; Type of plot (can be only 'xy' for plt). 29 26 ; Note: if param2 is defined as 'xy' then param4 is used to define the max (see param3) 30 27 ; 31 28 ; @keyword BOXZOOM {type=vector} 32 ; Vector indicating the geographic zone on which we want to cut the map. 29 ; Vector indicating the geographic zone on which we want to cut the map. 33 30 ; If BOXZOOM has : 34 31 ; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] … … 40 37 ; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 41 38 ; 42 ; @keyword REALCONT 39 ; @keyword REALCONT 43 40 ; Allow to draw continents defined in IDL. REALCONT can have 2 form: 44 41 ; /REALCONT: we draw continents in place of the mask 45 ; REALCONT=2 we draw continent's contour over the mask (this allows 42 ; REALCONT=2 we draw continent's contour over the mask (this allows 46 43 ; to see if the mask correspond at real continents). 47 44 ; 48 ; @keyword CONTINTERVALLE 49 ; When CONTOUR is activated, it is the value between 2 isolines 50 ; traced by a trait. So it can be different from the one specified by INTERVALLE which, 51 ; in this case, does not control colored isolines in color anymore. If there is noone 52 ; specified min, we choose a contour min which goes well with the specified interval! 53 ; If this keyword is not specified, we trace 20 isolines from the min to the max. 45 ; @keyword CONTINTERVALLE 46 ; When CONTOUR is activated, it is the value between 2 isolines 47 ; traced by a trait. So it can be different from the one specified by INTERVALLE which, 48 ; in this case, does not control colored isolines in color anymore. If there is noone 49 ; specified min, we choose a contour min which goes well with the specified interval! 50 ; If this keyword is not specified, we trace 20 isolines from the min to the max. 54 51 ; 55 52 ; @keyword CONTLABEL {type=integer} 56 53 ; It is an integer n. When CONTOUR is activated, if n 57 ; is different of 0, choose the label type corresponding to n cases for 58 ; the traced by a traitisolines. To specify the type of label of the 54 ; is different of 0, choose the label type corresponding to n cases for 55 ; the traced by a traitisolines. To specify the type of label of the 59 56 ; colored contour, use LABEL 60 57 ; 61 58 ; @keyword CONTMAX {default=The max of the array passed in the keyword CONTOUR (on ocean points)} 62 ; When CONTOUR is activated, max value we want to consider in the isoline 59 ; When CONTOUR is activated, max value we want to consider in the isoline 63 60 ; traced by a trait's line 64 61 ; 65 62 ; @keyword CONTMIN {default=The min of the array passed in the keyword CONTOUR (on ocean points)} 66 ; When CONTOUR is activated, min value we want to consider in the isoline 63 ; When CONTOUR is activated, min value we want to consider in the isoline 67 64 ; traced by a trait's line. 68 65 ; … … 72 69 ; CONTLABEL=0) 73 70 ; 74 ; @keyword CONTOUR 75 ; If we want to trace contours of a different field than the one 76 ; whose we have the colored drawing (by example E-P in color and QSR in contours). 71 ; @keyword CONTOUR 72 ; If we want to trace contours of a different field than the one 73 ; whose we have the colored drawing (by example E-P in color and QSR in contours). 77 74 ; It must be a field respecting same characteristics than the argument number one of plt. 78 75 ; … … 80 77 ; Comment: In this case, we should use a structure like field. 81 78 ; 82 ; @keyword INTERVALLE 83 ; Value of an internal between to isoline. If there is none specified min, 84 ; we choose a min contour which goes well with the specified interval!. If this keyword is not 85 ; specified, we trace 20 isoline from the min to the max. Comment: When CONTOUR is activated, 86 ; INTERVALLE only specify the interval between 2 colored isoline. To specify the interval 79 ; @keyword INTERVALLE 80 ; Value of an internal between to isoline. If there is none specified min, 81 ; we choose a min contour which goes well with the specified interval!. If this keyword is not 82 ; specified, we trace 20 isoline from the min to the max. Comment: When CONTOUR is activated, 83 ; INTERVALLE only specify the interval between 2 colored isoline. To specify the interval 87 84 ; between 2 isolines traced by a trait, use CONTINTERVALLE. 88 85 ; 89 ; @keyword INV 90 ; Invert the color vector used to color the graph 86 ; @keyword INV 87 ; Invert the color vector used to color the graph 91 88 ; (without use the black, the white and the used palette) 92 ; 89 ; 93 90 ; @keyword LABEL {type=integer} 94 ; It is an integer n. If n different of 0, it choose the label's type 95 ; corresponding to cases n. cf label.pro96 ; Comment: When CONTOUR is activated, it only specify the label's type for colored isolines. 91 ; It is an integer n. If n different of 0, it choose the label's type 92 ; corresponding to cases n. cf <pro>label</pro> 93 ; Comment: When CONTOUR is activated, it only specify the label's type for colored isolines. 97 94 ; For these one traced by a trait, use CONTLABEL. 98 95 ; … … 101 98 ; This keyword can be of two types: 102 99 ; MAP=[P0lat,P0lon,Rot]. For the description of these 3 values (see the online help of MAP_SET). 103 ; /MAP: In this case, map is automatically calculated have the value: 100 ; /MAP: In this case, map is automatically calculated have the value: 104 101 ; map = [0, (lon1+lon2)/2., 0] 105 102 ; Comment: A good way to choose the type of the projection we want to do is to have a look at IDL demo: 106 103 ; IDL> demo 107 104 ; Then choose earth sciences and mapping. 108 ; Comment2: By default it is a cylindrical projection which is effectuated (with or without the keyword map). 105 ; Comment2: By default it is a cylindrical projection which is effectuated (with or without the keyword map). 109 106 ; If we want an other projection, MAP must be activated and we have to add the keyword: /nom_projection. 110 107 ; For example, for a polar projection centered on the south pole: … … 115 112 ; Corresponds to label keywords of map_set. 116 113 ; 117 ; @keyword MAXIN 114 ; @keyword MAXIN 118 115 ; to specify the max value we want to plot with a keyword instead of with the 119 116 ; input parameter max. If max is defined by both, parameter and keyword, the 120 117 ; keyword is retained. 121 118 ; 122 ; @keyword MININ 119 ; @keyword MININ 123 120 ; to specify the min value we want to plot with a keyword instead of with the 124 121 ; input parameter min. If min is defined by both, parameter and keyword, the … … 129 126 ; LABEL=0 or is not specified. 130 127 ; 131 ; @keyword NOTRI 132 ; To force not to use the triangulation. Beware, in this case, the 133 ; drawing only works if the grid is undeformed (It means that each point of a longitude 134 ; give one latitude and each point of a latitude give one longitude) except if we use 135 ; the keyword CELL_FILL=2. 128 ; @keyword NOTRI 129 ; To force not to use the triangulation. Beware, in this case, the 130 ; drawing only works if the grid is undeformed (It means that each point of a longitude 131 ; give one latitude and each point of a latitude give one longitude) except if we use 132 ; the keyword CELL_FILL=2. 136 133 ; Comment: if the field contain points !values.f_nan, then we even do a triangulation. 137 134 ; 138 ; @keyword OVERPLOT 139 ; To make a plot over an other one. 140 ; Comment: Contrarily to the use of CONTOUR or VECTEUR, the use of this keyword 135 ; @keyword OVERPLOT 136 ; To make a plot over an other one. 137 ; Comment: Contrarily to the use of CONTOUR or VECTEUR, the use of this keyword 141 138 ; does not the caption and/or the color bar. 142 139 ; 143 ; @keyword STRICTFILL 144 ; Activate this keyword to that the filling of contours be 145 ; precisely done between the min and the max specified letting values inferior at the 140 ; @keyword STRICTFILL 141 ; Activate this keyword to that the filling of contours be 142 ; precisely done between the min and the max specified letting values inferior at the 146 143 ; specified min and values superior at the specified max in white. 147 144 ; … … 158 155 ; 159 156 ; @keyword _EXTRA 160 ; used to pass yourkeywords161 ; 162 ; @keyword CONT_NOFILL 163 ; Activate it not to fill the point mask to let them transparent! 157 ; Used to pass keywords 158 ; 159 ; @keyword CONT_NOFILL 160 ; Activate it not to fill the point mask to let them transparent! 164 161 ; Comment: Nevertheless, we trace mask's contour. 165 ; 162 ; 166 163 ; @keyword USETRI 167 164 ; To force using triangulation. 168 ; 169 ; @keyword MASKFILL 170 ; 165 ; 166 ; @keyword MASKFILL 167 ; 171 168 ; @keyword DUPLICATE 172 169 ; … … 176 173 ; common.pro 177 174 ; 178 ; @history 175 ; @history 179 176 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 180 177 ; 7/1999 181 178 ; Sebastien Masson 08/02/2000 checkfield and 182 179 ; notri keyword (or triangule = -1) . 183 ; 180 ; 184 181 ; @version 185 182 ; $Id$ 186 ; 187 ; @todo seb 183 ; 184 ; @todo seb 188 185 ; Changer param "tab1",keyword "REMPLI", "UNLABSUR", "UNSUR2", 189 186 ; "UNVECTSUR"+ quelques trucs dans la routine. 190 187 ;- 191 ;------------------------------------------------------------ 192 ;------------------------------------------------------------ 193 ;------------------------------------------------------------ 194 pro plt, tab1, param2, param3, param4, REALCONT = realcont, CONTOUR = contour $ 188 ; 189 PRO plt, tab1, param2, param3, param4, REALCONT = realcont, CONTOUR = contour $ 195 190 , INTERVALLE = intervalle, INV = inv, GRIDTYPE = gridtype, BOXZOOM = boxzoom $ 196 191 , CONTINTERVALLE = contintervalle, LABEL = label, CONTLABEL = contlabel $ … … 201 196 , DUPLICATE = duplicate, STRICTFILL = strictfill, OVERPLOT = overplot $ 202 197 , DECIMATETRI = decimatetri, LABMAP = labmap, _extra = ex 203 ;---------------------------------------------------------204 ; include common205 198 ; 206 199 compile_opt idl2, strictarrsubs … … 239 232 if n_elements(param3) NE 0 then min = param3 240 233 if n_elements(param4) NE 0 then max = param4 241 if n_elements(minin) NE 0 then min = minin 234 if n_elements(minin) NE 0 then min = minin 242 235 if n_elements(maxin) NE 0 then max = maxin 243 236 checktypeminmax, 'plt', TYPE = type, MIN = min, MAX = max, _extra = ex 244 z2d = checkfield(tab1, 'plt', TYPE = type, BOXZOOM = boxzoom, DIREC = direc, VECTEUR = vecteur, _extra = ex) 245 if z2d[0] EQ -1 then BEGIN 237 z2d = checkfield(tab1, 'plt', TYPE = type, BOXZOOM = boxzoom, DIREC = direc, VECTEUR = vecteur, _extra = ex) 238 if z2d[0] EQ -1 then BEGIN 246 239 IF keyword_set(savedbox) THEN restoreboxparam, 'boxparam4plt.dat' 247 240 return … … 249 242 IF n_elements(usetri) EQ 0 THEN BEGIN 250 243 ; do we have holes in the triangulation? 251 holeintri = n_elements(triangles_list)/3 LT (jpi-1+keyword_set(key_periodic))*(jpj-1)*2 ; -> the triangulation must be used to draw the field 244 holeintri = n_elements(triangles_list)/3 LT (jpi-1+keyword_set(key_periodic))*(jpj-1)*2 ; -> the triangulation must be used to draw the field 252 245 ; do we have a triangulation? 253 246 wehavetri = triangles_list[0] NE -1 ; -> the triangulation must be used to draw the continents … … 260 253 'F':nx = nxf 261 254 ENDCASE 262 mapperio = keyword_set(map)*keyword_set(key_periodic)*(nx eq jpi) 255 mapperio = keyword_set(map)*keyword_set(key_periodic)*(nx eq jpi) 263 256 usetri = (wehavetri*(wehavetri+holeintri+mapperio+keyword_set(key_irregular))) < 2 264 257 IF n_elements(notri) NE 0 THEN usetri = 0 > (2-notri) … … 273 266 ;--------------------------------------------------------------- 274 267 IF strupcase(vargrid) EQ 'W' THEN profond = firstzw NE 0 $ 275 ELSE profond = firstzt NE 0 268 ELSE profond = firstzt NE 0 276 269 ; do we need to extract now the triangulation that will be use for 277 270 ; contouring the field? … … 288 281 ENDELSE 289 282 ;---------------------------------------------------------------------------- 290 ; I5 determination of the mi:min and of the ma:max of z2d in the same way 283 ; I5 determination of the mi:min and of the ma:max of z2d in the same way 291 284 ; as max: max and min: min for the drawing. 292 285 ;----------------------------------------------------------------------------- 293 286 masknan = finite(z2d) 294 nan = total(masknan) NE n_elements(z2d) 287 nan = total(masknan) NE n_elements(z2d) 295 288 ; Do we need to do an autoscale ??? 296 289 autoscale = testvar(var = min) EQ testvar(var = max) AND NOT keyword_set(intervalle) … … 302 295 ;-------------------------------------------------------------- 303 296 ;-------------------------------------------------------------- 304 ; II) We put the drawing in its place on the window or the page 297 ; II) We put the drawing in its place on the window or the page 305 298 ; and possible opening of the window or of the page. 306 299 ;-------------------------------------------------------------- … … 361 354 ;---------------------------------------------------------- 362 355 ; check mask and triangulation according to the grid type and NaN 363 ;---------------------------------------------------------- 364 ; If we make a drawing at depth, we must redefine a triangulation 356 ;---------------------------------------------------------- 357 ; If we make a drawing at depth, we must redefine a triangulation 365 358 ; on the zoom because the land/sea mask at depth may differ from 366 359 ; the one at the surface. … … 385 378 ; IF n_elements(twin_corners_up) EQ 0 THEN coinmontemask = -1 ELSE coinmontemask = twin_corners_up 386 379 ; IF n_elements(twin_corners_dn) EQ 0 THEN coindescendmask = -1 ELSE coindescendmask = twin_corners_dn 387 if vargrid EQ 'T' OR vargrid EQ 'W' then BEGIN 380 if vargrid EQ 'T' OR vargrid EQ 'W' then BEGIN 388 381 glammsk = glam 389 382 gphimsk = gphi 390 383 ENDIF ELSE begin 391 ; decoupe terre: To draw the coast in a clean way, we try to take additionally 384 ; decoupe terre: To draw the coast in a clean way, we try to take additionally 392 385 ; points to draw the land. Like that, we do not see gap between T and U/V/F grid. 393 386 ; It is what decoupeterre do. We also redefine trimsk. … … 402 395 ;------------------------------------------------------------ 403 396 typetrace = 'classique' 404 if keyword_set(map) AND key_onearth then BEGIN 397 if keyword_set(map) AND key_onearth then BEGIN 405 398 ; Call of mapset when we want to do projections. 406 399 IF n_elements(map) NE 3 THEN map = [0, ((lon1+lon2)/2.) MOD 360, 0] … … 410 403 map_rot = map[2] 411 404 if chkstru(ex, 'TITLE') then begin 412 maptitre = ex.title 405 maptitre = ex.title 413 406 ex.title = '' 414 407 endif … … 418 411 if n_elements(trifield) GE 2 then trifield = ciseauxtri(trifield, glam, gphi, _EXTRA = ex) 419 412 if n_elements(trimsk) GE 2 then trimsk = ciseauxtri(trimsk, glammsk, gphimsk, _EXTRA = ex) 420 if n_elements(trinan) GE 2 then BEGIN 413 if n_elements(trinan) GE 2 then BEGIN 421 414 trinan = ciseauxtri(trinan, glam, gphi, _EXTRA = ex) 422 415 if trinan[0] EQ -1 then undefine, trinan 423 416 endif 424 ENDIF ELSE BEGIN 417 ENDIF ELSE BEGIN 425 418 ;To axes of coordinates be considerated. 426 419 if !x.type EQ 0 AND n_elements(contour) LE 4 then $ 427 plot, [0], [0], /nodata, xstyle = 5, ystyle = 5, title = '', subtitle = '', /noerase 420 plot, [0], [0], /nodata, xstyle = 5, ystyle = 5, title = '', subtitle = '', /noerase 428 421 if keyword_set(key_periodic) then BEGIN 429 ; In this case, triangulation is closed in x and cover all the sphere. 422 ; In this case, triangulation is closed in x and cover all the sphere. 430 423 ; We have to cut it at the level where we cut the sphere to make the drawing. 431 424 if n_elements(trifield) GE 2 then trifield = ciseauxtri(trifield, glam, gphi, _EXTRA = ex) … … 461 454 , Connout, vertices = Vertsout $ 462 455 , percent_vertices = decimatetri) 463 connout = reform(connout, 4, n_elements(connout)/4, /over) 456 connout = reform(connout, 4, n_elements(connout)/4, /over) 464 457 trifield = (temporary(connout))[1:3, *] 465 458 glam = reform(Vertsout[0, *]) … … 467 460 z2d = reform(Vertsout[2, *]) 468 461 undefine, Vertsout 469 print, 'temps decimatetri', systime(1)-tempsdeux 462 print, 'temps decimatetri', systime(1)-tempsdeux 470 463 ENDIF 471 464 pltbase, z2d, glam, gphi $ … … 486 479 return 487 480 endif 488 if keyword_set(contour) THEN BEGIN 481 if keyword_set(contour) THEN BEGIN 489 482 pourlegende = [1, 1, 1, 1] 490 483 oldattributs = saveatt() … … 507 500 ; V1) Possible add of vectors in double exposure. 508 501 ;------------------------------------------------------------ 509 if keyword_set(vecteur) then BEGIN 502 if keyword_set(vecteur) then BEGIN 510 503 oldattributs = saveatt() 511 504 ajoutvect, vecteur, vectlegende, _extra = ex … … 545 538 ;------------------------------------------------------------ 546 539 legende, mi, ma, 'xy', CONTOUR = pourlegende, VECTLEGENDE = vectlegende, INTERVALLE = intervalle, DIREC = direc, _EXTRA = ex 547 if n_elements(ex) NE 0 then BEGIN 540 if n_elements(ex) NE 0 then BEGIN 548 541 ; To keep frame's axes in black 549 542 if (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 then ex.COLOR = coast_color … … 553 546 'classique': $ 554 547 plot, [0], [0], /nodata, /noerase, color = 0, xstyle = 1, ystyle = 1, _extra = ex 555 'projection': BEGIN 548 'projection': BEGIN 556 549 if chkstru(ex, 'NOERASE') then begin 557 550 oldnoerase = ex.noerase … … 592 585 sortie: 593 586 if keyword_set(savedbox) THEN restoreboxparam, 'boxparam4plt.dat' 594 if keyword_set(key_performance) NE 0 THEN print, 'temps plt', systime(1)-tempsun 587 if keyword_set(key_performance) NE 0 THEN print, 'temps plt', systime(1)-tempsun 595 588 ;------------------------------------------------------------ 596 589 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/plt1d.pro
r172 r231 1 ;------------------------------------------------------------2 1 ;+ 3 2 ; … … 8 7 ; Graphics 9 8 ; 10 ; @param TAB {in}{required} 9 ; @param TAB {in}{required} 11 10 ; The field whose we want to make the hovmoller map can be 2 kind of thing: 12 11 ; 1) An array which can be: 13 ; * 2d, 3d or 4d: array xy, xyz. xyt or xyzt. In this case, the array will pass 14 ; in moyenne or grossemoyenne to be averaged and become an array 1d. 15 ; * 1d:Nevertheless, the type must be specified in order to we know which trace 12 ; * 2d, 3d or 4d: array xy, xyz. xyt or xyzt. In this case, the array will pass 13 ; in moyenne or grossemoyenne to be averaged and become an array 1d. 14 ; * 1d:Nevertheless, the type must be specified in order to we know which trace 16 15 ; it is about. To have a correct caption, respecify the extraction zone via BOXZOOM. 17 ; 2) a structure respecting all criterions specified by litchamp.pro.18 ; See IDL> xhelp,'litchamp'. The array contained in the structure 19 ; respecting criterions of case 1) 20 ; 21 ; @param PARAM2 {in}{required} 16 ; 2) a structure respecting all criterions specified by <pro>litchamp</pro> 17 ; See IDL> xhelp,'litchamp'. The array contained in the structure 18 ; respecting criterions of case 1) 19 ; 20 ; @param PARAM2 {in}{required} 22 21 ; Min value we want to consider in the contour's drawing. 23 22 ; Note: could also be the type of plot:'x','y','z' 24 ; 25 ; @param PARAM3 {in}{optional}{default=min/max of tab (on ocean points)} 23 ; 24 ; @param PARAM3 {in}{optional}{default=min/max of tab (on ocean points)} 26 25 ; Max value we want to consider in the contour's drawing. 27 26 ; Note: if param2 is defined as 'x','y','z' then param3 is used to define the min (see param2) 28 27 ; 29 ; @param PARAM4 {in}{optional}{default=max of tab (on ocean points)} 28 ; @param PARAM4 {in}{optional}{default=max of tab (on ocean points)} 30 29 ; Type of plot (can be only 'x','y','z' for plt1d). 31 30 ; Note: if param2 is defined as 'xy' then param4 is used to define the max (see param3) 32 31 ; 33 32 ; @keyword BOXZOOM 34 ; Vector indicating the geographic zone (3d) on which the extraction of the field must 33 ; Vector indicating the geographic zone (3d) on which the extraction of the field must 35 34 ; be done to do the hovmoeller. 36 35 ; If BOXZOOM has : … … 44 43 ; 45 44 ; @keyword COL1d 46 ; --OBSOLETE--Color number when we make a trace 1d by default, 0.It is better to use the 47 ; keyword COLOR used by plot. 48 ; 49 ; @keyword ENDPOINTS 50 ; keyword specifying that we want to make a vertical cut in diagonal. Then coordinated of extremities 51 ; of these one are defined by the 4 elements of the vector ENDPOINTS: [x1,y1,x2,y2] which are 52 ; coordinates. 53 ; 54 ; @keyword MAXIN 55 ; Allows to specify the max value we want to consider in the drawing of contour 56 ; helping by the keyword instead of the argument max. If the argument and the keyword are 57 ; specified in the same time, it is the value specified by the keyword which is retained. 58 ; 59 ; @keyword MININ 60 ; Allows to specify the min value we want to consider in the drawing of contour 61 ; helping by the keyword instead of the argument min. If the argument and the keyword are 62 ; specified in the same time, it is the value specified by the keyword which is retained. 45 ; --OBSOLETE--Color number when we make a trace 1d by default, 0. 46 ; It is better to use the keyword COLOR used by plot. 47 ; 48 ; @keyword ENDPOINTS 49 ; keyword specifying that we want to make a vertical cut in diagonal. 50 ; Then coordinated of extremities of these one are defined by the 4 elements 51 ; of the vector ENDPOINTS: [x1,y1,x2,y2] which are coordinates. 52 ; 53 ; @keyword MAXIN 54 ; Allows to specify the max value we want to consider in the drawing of contour 55 ; helping by the keyword instead of the argument max. 56 ; If the argument and the keyword are specified in the same time, it is the 57 ; value specified by the keyword which is retained. 58 ; 59 ; @keyword MININ 60 ; Allows to specify the min value we want to consider in the drawing of contour 61 ; helping by the keyword instead of the argument min. 62 ; If the argument and the keyword are specified in the same time, it is the 63 ; value specified by the keyword which is retained. 63 64 ; 64 65 ; @keyword OV1D 65 66 ; Allow the double exposure of an 1d curve to a precedent 1d trace. 66 67 ; 67 ; @keyword REVERSE_X 68 ; @keyword REVERSE_X 68 69 ; To invert the x axis (so as the drawing) 69 70 ; 70 ; @keyword REVERSE_Y 71 ; @keyword REVERSE_Y 71 72 ; To invert the y axis (so as the drawing) 72 73 ; 73 ; @keyword SIN 74 ; Activate this keyword if we want the x axis to be traced in sinus of the 74 ; @keyword SIN 75 ; Activate this keyword if we want the x axis to be traced in sinus of the 75 76 ; latitude when we make a drawing f(y) 76 77 ; 77 ; @keyword STY1D 78 ; @keyword STY1D 78 79 ; --OBSOLETE-- 79 ; Number of the style used when we make a 1d drawing. We should better use the 80 ; keyword LINESTYLE which is tho one of the plot. Beware, this keyword is still 80 ; Number of the style used when we make a 1d drawing. We should better use the 81 ; keyword LINESTYLE which is tho one of the plot. Beware, this keyword is still 81 82 ; useful if we want to d bars instead of curves, put sty1d='bar' 82 83 ; 83 84 ; @keyword TYPEIN 84 85 ; allows to specify the type of hovmoller we want to do 85 ; 'xt','yt','zt','t' 86 ; with help of a keyword rather than the argument type. If the argument and the 87 ; keyword are specified in the same time, it is the value specified by the 86 ; 'xt','yt','zt','t' 87 ; with help of a keyword rather than the argument type. If the argument and the 88 ; keyword are specified in the same time, it is the value specified by the 88 89 ; keyword which is retained. 89 90 ; 90 ; @keyword _EXTRA 91 ; used to pass yourkeywords92 ; 93 ; @history 94 ; creation 24/6/99 Eric Guilyardi 91 ; @keyword _EXTRA 92 ; Used to pass keywords 93 ; 94 ; @history 95 ; creation 24/6/99 Eric Guilyardi 95 96 ; (a partir routine pltt de Sebastien Masson) 96 ; 8/7/1999 Sebastien Masson (smasson\@lodyc.jussieu.fr) 97 ; 8/7/1999 Sebastien Masson (smasson\@lodyc.jussieu.fr) 97 98 ; inspection des travaux finis 98 99 ; 8/2/2000 Sebastien Masson: checkfield 99 100 ; 100 ; @version 101 ; @version 101 102 ; $Id$ 102 103 ; 103 104 ;- 104 ;------------------------------------------------------------ 105 ;------------------------------------------------------------ 106 ;------------------------------------------------------------ 107 pro plt1d, tab, param2, param3, param4, BOXZOOM = boxzoom, SIN = sin $ 105 ; 106 PRO plt1d, tab, param2, param3, param4, BOXZOOM = boxzoom, SIN = sin $ 108 107 , MININ = minin, MAXIN = maxin, TYPEIN = typein, ENDPOINTS = endpoints $ 109 108 , COL1D = col1d, STY1D = sty1d, OV1D = ov1d, X = x, Y = y, Z = z, TT = tt $ … … 137 136 if n_elements(maxin) NE 0 then max = maxin 138 137 if keyword_set(tt) then typein = 't' 139 if keyword_set(typein) then BEGIN 138 if keyword_set(typein) then BEGIN 140 139 if size(type, /type) NE 7 AND size(type, /type) NE 0 then begin 141 140 if n_elements(min) NE 0 then max = min … … 146 145 ; 147 146 checktypeminmax, 'plt1d', TYPE = type, MIN = min, MAX = max, ENDPOINTS = endpoints $ 148 , XX = keyword_set(x), YY = keyword_set(y), ZZ = keyword_set(z) 147 , XX = keyword_set(x), YY = keyword_set(y), ZZ = keyword_set(z) 149 148 if type EQ 't' then BEGIN 150 149 pltt, tab, type, min, max, BOXZOOM = boxzoom, SIN = sin, TYPEIN = typein $ … … 168 167 section, tab, z1d, glam, gphi, ENDPOINTS = endpoints, TYPE = type $ 169 168 , BOXZOOM = boxzoom, DIREC = direc 170 nx = n_elements(glam) 169 nx = n_elements(glam) 171 170 ny = nx 172 171 if strupcase(vargrid) EQ 'W' then begin … … 177 176 nz = nzt 178 177 ENDELSE 179 ENDIF ELSE BEGIN 178 ENDIF ELSE BEGIN 180 179 z1d = checkfield(tab, 'plt1d', TYPE = type, BOXZOOM = boxzoom $ 181 180 , direc = direc, _extra = ex) 182 181 grille, mask, glam, gphi, gdep, nx, ny, nz, type = type 183 182 ENDELSE 184 if z1d[0] EQ -1 then BEGIN 183 if z1d[0] EQ -1 then BEGIN 185 184 IF keyword_set(savedbox) THEN restoreboxparam, 'boxparam4plt1d.dat' 186 185 return 187 186 endif 188 ; We build the mask. For this, the array must be hidden (Automaticaly done at valmask 187 ; We build the mask. For this, the array must be hidden (Automaticaly done at valmask 189 188 ; value if we pass in moyenne or grossemoyenne) 190 189 mask = fltarr(n_elements(z1d)) … … 212 211 ;----------------------------------------------------------------------------- 213 212 ; definition of the abscisse and ordinate vectors. 214 ; The triangulation is defined in order to the drawing be done from the 215 ; left bottom to the right up. So the matrix have to be shown like this, 213 ; The triangulation is defined in order to the drawing be done from the 214 ; left bottom to the right up. So the matrix have to be shown like this, 216 215 ; from which some transpose and reverse 217 216 ;----------------------------------------------------------------------------- … … 220 219 'y': begin 221 220 yy = z1d 222 IF (size(gphi))[0] EQ 1 then xx = gphi ELSE BEGIN 223 IF keyword_set(key_irregular) THEN BEGIN 221 IF (size(gphi))[0] EQ 1 then xx = gphi ELSE BEGIN 222 IF keyword_set(key_irregular) THEN BEGIN 224 223 cln = (where(gphi EQ max(gphi)))[0] 225 224 xx = reform(gphi[cln MOD nx, *]) … … 233 232 xx = glam[*, 0] 234 233 min0 = lon1 & max0 = lon2 235 END 234 END 236 235 'z':begin 237 236 yy = reverse(gdep, 1) … … 247 246 endcase 248 247 if NOT keyword_set(ov1d) then !y.range = reverse(!y.range) 249 END 250 ENDCASE 248 END 249 ENDCASE 251 250 ;----------------------------------------------------------- 252 251 ;----------------------------------------------------------- … … 263 262 if type EQ 'z' then begin 264 263 idx = where(xx NE valmask) 265 if NOT keyword_set(ov1d) then BEGIN 264 if NOT keyword_set(ov1d) then BEGIN 266 265 if min EQ mi then !x.range = [min-abs(max-min)/5., max+abs(max-min)/5.] $ 267 266 ELSE !x.range = [min, max] 268 267 ENDIF 269 ENDIF ELSE BEGIN 268 ENDIF ELSE BEGIN 270 269 idx = where(yy NE valmask) 271 if NOT keyword_set(ov1d) then BEGIN 270 if NOT keyword_set(ov1d) then BEGIN 272 271 if min EQ mi then !y.range = [min-abs(max-min)/5., max+abs(max-min)/5.] $ 273 272 ELSE !y.range = [min, max] 274 273 ENDIF 275 ENDELSE 276 ; 277 if NOT keyword_set(ov1d) then BEGIN 274 ENDELSE 275 ; 276 if NOT keyword_set(ov1d) then BEGIN 278 277 legende, mi, ma, type, CONTOUR = contour, DIREC = direc, ENDPOINTS = endpoints, _EXTRA = ex 279 278 ; … … 283 282 xx = yy 284 283 yy = temporary(tmp) 285 if NOT keyword_set(ov1d) then BEGIN 284 if NOT keyword_set(ov1d) then BEGIN 286 285 tmp = !x 287 286 !x = !y … … 289 288 ENDIF 290 289 ENDIF 291 if NOT keyword_set(ov1d) then BEGIN 290 if NOT keyword_set(ov1d) then BEGIN 292 291 if keyword_set(reverse_x) then !x.range = reverse(!x.range) 293 292 if keyword_set(reverse_y) then !y.range = reverse(!y.range) … … 299 298 if keyword_set(sty1d) then BEGIN ;If we want to make bars 300 299 IF strlowcase(strtrim(sty1d)) EQ 'bar' then begin 301 !y.range = [!y.range[0]-(!y.range[1]-!y.range[0])*.05, !y.range[1]] 300 !y.range = [!y.range[0]-(!y.range[1]-!y.range[0])*.05, !y.range[1]] 302 301 bar_plot, yy, background = (!d.n_colors-1) < 255, $ 303 302 baselines = replicate(!y.range[0], n_elements(yy)), barnames = ['', ''], $ 304 303 colors = replicate(col1d, n_elements(yy)), /outline 305 if n_elements(ex) NE 0 then BEGIN 304 if n_elements(ex) NE 0 then BEGIN 306 305 ; To have a black frame 307 306 if (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 then ex.COLOR = 0 … … 309 308 plot, [0], [0], /noerase, /nodata, _extra = ex 310 309 GOTO, fini 311 ENDIF 312 ENDIF 313 ; 314 if NOT keyword_set(ov1d) then BEGIN 310 ENDIF 311 ENDIF 312 ; 313 if NOT keyword_set(ov1d) then BEGIN 315 314 ; 316 315 plot, xx, yy, color = col1d, linestyle = sty1d, thick = 2, title = '', subtitle = '', _extra = ex 317 if n_elements(ex) NE 0 then BEGIN 316 if n_elements(ex) NE 0 then BEGIN 318 317 ; To have a 0 colored frame and trace a line at y=0 319 318 if (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 then ex.COLOR = 0 … … 340 339 ;------------------------------------------------------------ 341 340 if n_elements(key_performance) NE 0 then $ 342 IF key_performance EQ 1 THEN print, 'temps plt1d', systime(1)-tempsun 341 IF key_performance EQ 1 THEN print, 'temps plt1d', systime(1)-tempsun 343 342 ;------------------------------------------------------------ 344 343 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltbase.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 93 90 ; 94 91 ; @keyword _EXTRA 95 ; Used to pass yourkeywords92 ; Used to pass keywords 96 93 ; 97 94 ; @uses … … 113 110 ; 114 111 ;- 115 ;------------------------------------------------------------ 116 ;------------------------------------------------------------ 117 ;------------------------------------------------------------ 112 ; 118 113 PRO pltbase, z2d, x, y, mask, xm, ym, levels, colors, UNSUR2 = unsur2, CONTOUR = contour $ 119 114 , NOCONTOUR = nocontour, NOFILL = nofill $ -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltsc.pro
r163 r231 2 2 ; @file_comments 3 3 ; 4 ;5 4 ; @categories 6 ;7 5 ; 8 6 ; @param TAB1 9 7 ; 10 ;11 8 ; @param TAB2 12 ;13 9 ; 14 10 ; @param MIN1 15 11 ; 16 ;17 12 ; @param MAX1 18 ;19 13 ; 20 14 ; @param MIN2 21 15 ; 22 ;23 16 ; @param MAX2 24 ;25 17 ; 26 18 ; @param VARNAME2 27 19 ; 28 ;29 20 ; @keyword BOXZOOM 30 ; Vector indicating the geographic zone on which we want to cut the map. 21 ; Vector indicating the geographic zone on which we want to cut the map. 31 22 ; If BOXZOOM has : 32 23 ; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] … … 38 29 ; @keyword COL1D 39 30 ; 40 ;41 31 ; @keyword STY1D 42 ;43 32 ; 44 33 ; @keyword OV1D 45 34 ; 46 ;47 35 ; @keyword _EXTRA 48 ; Used to pass yourkeywords36 ; Used to pass keywords 49 37 ; 50 38 ; @returns 51 39 ; 52 ;53 40 ; @uses 54 ;55 41 ; 56 42 ; @restrictions 57 43 ; 58 ;59 44 ; @examples 60 45 ; 61 ;62 46 ; @history 63 ;64 47 ; 65 48 ; @version … … 74 57 ; scatter plot (inspired from plt1d) 75 58 ; 76 ;77 59 compile_opt idl2, strictarrsubs 78 60 ; 79 80 ;---------------------------------------------------------81 ; include common82 61 @cm_4mesh 83 62 @cm_4data … … 86 65 @updatekwd 87 66 ENDIF 88 ;--------------------------------------------------------------89 67 90 68 ; Comment: We do not reinitializate when we call back pltsc … … 92 70 ;; reduce data xyzt domain 93 71 94 if keyword_set(boxzoom) then BEGIN 72 if keyword_set(boxzoom) then BEGIN 95 73 Case 1 Of 96 74 N_Elements(Boxzoom) Eq 1:bte = [lon1, lon2, lat1, lat2, 0., boxzoom[0]] … … 100 78 N_Elements(Boxzoom) Eq 6:bte = Boxzoom 101 79 Else: Begin 102 ras = report('Wrong Definition of Boxzoom') 80 ras = report('Wrong Definition of Boxzoom') 103 81 return 104 82 End … … 122 100 IF finite(min2) EQ 0 THEN min2 = min(tab2) 123 101 IF finite(max2) EQ 0 THEN max2 = max(tab2) 124 102 125 103 126 104 ; init plot if not overlay 127 105 128 106 IF NOT keyword_set(ov1d) THEN placedessin, 'yfx', posfenetre, posbar, $ 129 107 contour = contour, _extra = ex … … 137 115 IF (NOT keyword_set(sty1d)) THEN sty1d = 0 138 116 IF (NOT keyword_set(col1d)) THEN col1d = 0 139 IF NOT keyword_set(ov1d) THEN BEGIN 140 legende, min1, max1, 'yfx', VARNAME2 = varname2, NPTS = npts, _EXTRA = ex 117 IF NOT keyword_set(ov1d) THEN BEGIN 118 legende, min1, max1, 'yfx', VARNAME2 = varname2, NPTS = npts, _EXTRA = ex 141 119 ; 142 120 plot,xx,yy, background = 255, psym = sty1d+1, color=col1d, thick=2 $ 143 121 , title = '', subtitle = '',_extra = ex 144 122 145 if n_elements(ex) NE 0 then BEGIN 123 if n_elements(ex) NE 0 then BEGIN 146 124 ; To have a 0 colored frame and trace a line at y=0 147 125 if (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 then ex.COLOR = 0 … … 162 140 ;------------------------------------------------------------ 163 141 if n_elements(key_performance) NE 0 then $ 164 IF key_performance EQ 1 THEN print, 'temps plt1d', systime(1)-tempsun 142 IF key_performance EQ 1 THEN print, 'temps plt1d', systime(1)-tempsun 165 143 ;------------------------------------------------------------ 166 144 ;------------------------------------------------------------ … … 168 146 return 169 147 end 170 171 -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltt.pro
r192 r231 1 ;------------------------------------------------------------2 1 ;+ 3 2 ; 4 ; @file_comments 3 ; @file_comments 5 4 ; Trace hovmoller graphs: xt,yt,zt,t 6 5 ; 7 6 ; @categories Graphics 8 7 ; 9 ; @param TAB {in}{required} 8 ; @param TAB {in}{required} 10 9 ; The field whose we want to make the hovmoller map can be 2 kind of thing: 11 10 ; 1) An array which can be: 12 ; * 3d or 4d: array 'xt','yt','zt','t'. The last component is the time. In this case, the array will 11 ; * 3d or 4d: array 'xt','yt','zt','t'. The last component is the time. In this case, the array will 13 12 ; pass in grossemoyenne to be averaged and become an 1d or 2d array. 14 ; * 2d: If the array is already 2d, it is not modified (beware, lands must 15 ; be masked at the value valmask) and nevertheless,type must be specified 13 ; * 2d: If the array is already 2d, it is not modified (beware, lands must 14 ; be masked at the value valmask) and nevertheless,type must be specified 16 15 ; to we know of which trace it is about. 17 16 ; To have a correct caption, respecify the extraction zone via BOXZOOM. 18 ; * 1d: only for traces of the 't' type. Nevertheless, type must be specified 17 ; * 1d: only for traces of the 't' type. Nevertheless, type must be specified 19 18 ; to we know of which trace it is about. 20 19 ; To have a correct caption, respecify the extraction zone via BOXZOOM. 21 ; 2) a structure respecting all criterions specified by litchamp.pro.22 ; See IDL> xhelp,'litchamp'. The array contained in the structure 23 ; respecting criterions of case 1) 24 ; 20 ; 2) a structure respecting all criterions specified by <pro>litchamp</pro> 21 ; See IDL> xhelp,'litchamp'. The array contained in the structure 22 ; respecting criterions of case 1) 23 ; 25 24 ; PARAM: 26 25 ; MAX: valeur maximum que l''on veut prendre en compte dans le trace … … 38 37 ; 39 38 ; @keyword BOXZOOM 40 ; Vector indicating the geographic zone (3d) on which the extraction of the field must 39 ; Vector indicating the geographic zone (3d) on which the extraction of the field must 41 40 ; be done to do the hovmoeller. 42 41 ; If BOXZOOM has : … … 49 48 ; Where lon1, lon2,lat1,lat2,vert1,vert2 are global variables defined at the last domdef! 50 49 ; 51 ; @keyword CONTINTERVALLE 52 ; When CONTOUR is activated, it is the value between 2 isolines 53 ; traced by a trait. So it can be different from the one specified by INTERVALLE which, 54 ; in this case, does not control colored isolines in color anymore. If there is noone 55 ; specified min, we choose a contour min which goes well with the specified interval! 56 ; If this keyword is not specified, we trace 20 isolines from the min to the max. 50 ; @keyword CONTINTERVALLE 51 ; When CONTOUR is activated, it is the value between 2 isolines 52 ; traced by a trait. So it can be different from the one specified by INTERVALLE which, 53 ; in this case, does not control colored isolines in color anymore. If there is noone 54 ; specified min, we choose a contour min which goes well with the specified interval! 55 ; If this keyword is not specified, we trace 20 isolines from the min to the max. 57 56 ; 58 57 ; @keyword CONTLABEL {type=integer} 59 58 ; When CONTOUR is activated, if n 60 ; is different of 0, choose the label type corresponding to n cases for 61 ; the traced by a traitisolines. To specify the type of label of the 59 ; is different of 0, choose the label type corresponding to n cases for 60 ; the traced by a traitisolines. To specify the type of label of the 62 61 ; colored contour, use LABEL 63 62 ; 64 63 ; @keyword CONTMAX {default=we take the max of the array passed in the keyword CONTOUR (on ocean points)} 65 ; When CONTOUR is activated, max value we want to consider in the isoline 66 ; traced by a trait's line. 64 ; When CONTOUR is activated, max value we want to consider in the isoline 65 ; traced by a trait's line. 67 66 ; 68 67 ; @keyword CONTMIN {default=we take the min of the array passed in the keyword CONTOUR (on ocean points)} 69 ; When CONTOUR is activated, min value we want to consider in the isoline 70 ; traced by a trait's line. 68 ; When CONTOUR is activated, min value we want to consider in the isoline 69 ; traced by a trait's line. 71 70 ; 72 71 ; @keyword CONTNLEVEL {default=20} … … 75 74 ; CONTLABEL=0). 76 75 ; 77 ; @keyword CONTOUR 78 ; If we want to trace contours of a different field than the one 79 ; whose we have the colored drawing (by example E-P in color and QSR in contours). 76 ; @keyword CONTOUR 77 ; If we want to trace contours of a different field than the one 78 ; whose we have the colored drawing (by example E-P in color and QSR in contours). 80 79 ; It must be a field respecting same characteristics than the argument number one of pltt. 81 80 ; 82 ; @keyword ENDPOINTS 83 ; keyword specifying that we want to make a vertical cut in diagonal. Then coordinated of extremities 84 ; of these one are defined by the 4 elements of the vector ENDPOINTS: [x1,y1,x2,y2] which are 85 ; coordinates. 81 ; @keyword ENDPOINTS 82 ; keyword specifying that we want to make a vertical cut in diagonal. Then coordinated of extremities 83 ; of these one are defined by the 4 elements of the vector ENDPOINTS: [x1,y1,x2,y2] which are 84 ; coordinates. 86 85 ; 87 86 ; @keyword EXCHANGE_XY 88 87 ; Allows to invert axes. 89 ; 88 ; 90 89 ; @keyword FILTER 91 90 ; Apply a slippery average of width FILTER 92 ; 93 ; @keyword INTERVALLE 94 ; Value of an internal between to isoline. If there is none specified min, 95 ; we choose a min contour which goes well with the specified interval!. If this keyword is not 96 ; specified, we trace 20 isoline from the min to the max. Comment: When CONTOUR is activated, 97 ; INTERVALLE only specify the interval between 2 colored isoline. To specify the interval 91 ; 92 ; @keyword INTERVALLE 93 ; Value of an internal between to isoline. If there is none specified min, 94 ; we choose a min contour which goes well with the specified interval!. If this keyword is not 95 ; specified, we trace 20 isoline from the min to the max. Comment: When CONTOUR is activated, 96 ; INTERVALLE only specify the interval between 2 colored isoline. To specify the interval 98 97 ; between 2 isolines traced by a trait, use CONTINTERVALLE. 99 98 ; 100 ; @keyword INV 101 ; Invert the color vector used to color the graph 99 ; @keyword INV 100 ; Invert the color vector used to color the graph 102 101 ; (without use the black, the white and the used palette) 103 ; 102 ; 104 103 ; @keyword LABEL {type=integer} 105 ; If n different of 0, it choose the label's type 106 ; corresponding to cases n. cf label.pro107 ; Comment: When CONTOUR is activated, it only specify the label's type for colored isolines. 108 ; For these one traced by a trait, use CONTLABEL. 104 ; If n different of 0, it choose the label's type 105 ; corresponding to cases n. cf <pro>label</pro> 106 ; Comment: When CONTOUR is activated, it only specify the label's type for colored isolines. 107 ; For these one traced by a trait, use CONTLABEL. 109 108 ; 110 109 ; @keyword COL1d 111 ; --OBSOLETE--Color number when we make a trace 1d by default, 0.It is better to use the 110 ; --OBSOLETE--Color number when we make a trace 1d by default, 0.It is better to use the 112 111 ; keyword COLOR used by plot. 113 112 ; 114 ; @keyword MAXIN 113 ; @keyword MAXIN 115 114 ; to specify the max value we want to plot with a keyword instead of with the 116 115 ; input parameter max. If max is defined by both, parameter and keyword, the 117 116 ; keyword is retained. 118 117 ; 119 ; @keyword MININ 118 ; @keyword MININ 120 119 ; to specify the min value we want to plot with a keyword instead of with the 121 120 ; input parameter min. If min is defined by both, parameter and keyword, the … … 131 130 ; CONTLABEL=0). 132 131 ; 133 ; @keyword OV1D 132 ; @keyword OV1D 134 133 ; Allows to overprint a 1d curve over a precedent 1d drawing. 135 134 ; 136 ; @keyword OVERPLOT 137 ; To make a plot over an other one. 138 ; Comment: Contrarily to the use of CONTOUR or VECTEUR, the use of this keyword 135 ; @keyword OVERPLOT 136 ; To make a plot over an other one. 137 ; Comment: Contrarily to the use of CONTOUR or VECTEUR, the use of this keyword 139 138 ; does not the caption and/or the color bar. 140 139 ; 141 ; @keyword STRICTFILL 142 ; Activate this keyword to that the filling of contours be 143 ; precisely done between the min and the max specified letting values inferior at the 140 ; @keyword STRICTFILL 141 ; Activate this keyword to that the filling of contours be 142 ; precisely done between the min and the max specified letting values inferior at the 144 143 ; specified min and values superior at the specified max in white. 145 144 ; … … 147 146 ; Contour's style to adopt to draw isolines 148 147 ; 149 ; @keyword STY1D 148 ; @keyword STY1D 150 149 ; --OBSOLETE-- 151 ; Number of the style used when we make a 1d drawing. We should better use the 152 ; keyword LINESTYLE which is tho one of the plot. Beware, this keyword is still 150 ; Number of the style used when we make a 1d drawing. We should better use the 151 ; keyword LINESTYLE which is tho one of the plot. Beware, this keyword is still 153 152 ; useful if we want to d bars instead of curves, put sty1d='bar' 154 153 ; 155 154 ; @keyword TREND_TYPE 156 ; Modify field by calling trends.pro155 ; Modify field by calling <pro>trends</pro> 157 156 ; 158 157 ; @keyword TYPEIN 159 158 ; allows to specify the type of hovmoller we want to do 160 ; 'xt','yt','zt','t' 161 ; with help of a keyword rather than the argument type. If the argument and the 162 ; keyword are specified in the same time, it is the value specified by the 159 ; 'xt','yt','zt','t' 160 ; with help of a keyword rather than the argument type. If the argument and the 161 ; keyword are specified in the same time, it is the value specified by the 163 162 ; keyword which is retained. 164 163 ; 165 164 ; @keyword _EXTRA 166 ; Used to pass yourkeywords165 ; Used to pass keywords 167 166 ; 168 167 ; @uses 169 168 ; common.pro 170 169 ; 171 ; @history 170 ; @history 172 171 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 173 172 ; 27/5/98 … … 177 176 ; 15/1/98 178 177 ; Adaptation for arrays 3 and 4d to the average be done in pltt rather than during the reading. 179 ; Sebastien Masson 14/8/98 180 ; 7/1999 178 ; Sebastien Masson 14/8/98 179 ; 7/1999 181 180 ; Eric Guilyardi 29/7/99 FILTER, TREND_TYPE, 182 ; REPEAT_C 181 ; REPEAT_C 183 182 ; Sebastien Masson 08/02/2000 checkfield and 184 183 ; usetri keyword. 185 ; 186 ; @version 184 ; 185 ; @version 187 186 ; $Id$ 188 187 ; 189 188 ; @todo seb: L.24 à 36, L.426 à 427, L. 492 à 493 190 189 ;- 191 ;------------------------------------------------------------ 192 ;------------------------------------------------------------ 193 ;------------------------------------------------------------ 190 ; 194 191 pro pltt,tab,giventype,givenmin,givenmax,datmin,datmax,BOXZOOM = boxzoom, CONTOUR=contour $ 195 192 ,ENDPOINTS=endpoints,INTERVALLE=intervalle,INV=inv $ … … 203 200 , EXCHANGE_XY = exchange_xy $ 204 201 , _extra = ex 205 ;---------------------------------------------------------206 ; include common207 202 ; 208 203 compile_opt idl2, strictarrsubs … … 237 232 if n_elements(minin) NE 0 then min = minin 238 233 if n_elements(maxin) NE 0 then max = maxin 239 if keyword_set(typein) then BEGIN 234 if keyword_set(typein) then BEGIN 240 235 if size(type, /type) NE 7 AND size(type, /type) NE 0 then begin 241 236 if n_elements(min) NE 0 then max = min … … 251 246 section, tab, z2d, glam, gphi, ENDPOINTS = endpoints, TYPE = type $ 252 247 , BOXZOOM = boxzoom, DIREC = direc 253 nx = n_elements(glam) 248 nx = n_elements(glam) 254 249 ny = nx 255 250 if strupcase(vargrid) EQ 'W' then begin … … 260 255 nz = nzt 261 256 ENDELSE 262 ENDIF ELSE BEGIN 257 ENDIF ELSE BEGIN 263 258 z2d = checkfield(tab, 'pltt', TYPE = type, BOXZOOM = boxzoom $ 264 259 , direc = direc, _extra = ex) 265 if z2d[0] EQ -1 then BEGIN 260 if z2d[0] EQ -1 then BEGIN 266 261 IF keyword_set(savedbox) THEN restoreboxparam, 'boxparam4pltt.dat' 267 262 return … … 278 273 279 274 ;--------------------------------------------------------------- 280 ; Filtering of fields in the 't' case. 281 ;--------------------------------------------------------------- 282 283 IF type EQ 't' AND keyword_set(filter) THEN BEGIN 275 ; Filtering of fields in the 't' case. 276 ;--------------------------------------------------------------- 277 278 IF type EQ 't' AND keyword_set(filter) THEN BEGIN 284 279 print, ' Applying a running mean filter of width '+string(filter, format = '(I3)') 285 280 z2d = smooth(z2d, filter) 286 281 z2d[0:filter/2-1] = 0. 287 282 z2d[(size(z2d))[1]-filter/2-1:(size(z2d))[1]-1] = 0. 288 ENDIF 283 ENDIF 289 284 290 285 ;--------------------------------------------------------------- … … 302 297 z2d = z2d[*]#replicate(1, repeat_c) 303 298 z2d = reform(z2d, taille[1], taille[2]*repeat_c, /over) 304 END 305 ELSE: 299 END 300 ELSE: 306 301 ENDCASE 307 302 temps = [temps, (lindgen(jpt*(REPEAT_c-1))+1)*(temps[1]-temps[0])+temps[jpt-1]] 308 ENDIF 309 310 ;--------------------------------------------------------------- 311 ; Selection of graphic's type. 303 ENDIF 304 305 ;--------------------------------------------------------------- 306 ; Selection of graphic's type. 312 307 ;--------------------------------------------------------------- 313 308 taille=size(z2d) … … 332 327 end 333 328 endcase 334 ; We build the mask. For that, the table must be masked (automaticaly done at the 329 ; We build the mask. For that, the table must be masked (automaticaly done at the 335 330 ; value valmask if we pass in moyenne or grossemoyenne) 336 331 nan = total(finite(z2d,/nan)) < 1 … … 365 360 ;----------------------------------------------------------------------------- 366 361 ; definition of the abscisse and ordinate vectors. 367 ; The triangulation is defined in order to the drawing be done from the 368 ; left bottom to the right up. So the matrix have to be shown like this, 362 ; The triangulation is defined in order to the drawing be done from the 363 ; left bottom to the right up. So the matrix have to be shown like this, 369 364 ; from which some transpose and reverse 370 365 ;----------------------------------------------------------------------------- … … 401 396 end 402 397 type eq 'yt' : begin 403 IF (size(gphi))[0] EQ 1 then yy = gphi ELSE BEGIN 404 IF keyword_set(key_irregular) THEN BEGIN 398 IF (size(gphi))[0] EQ 1 then yy = gphi ELSE BEGIN 399 IF keyword_set(key_irregular) THEN BEGIN 405 400 cln = (where(gphi EQ max(gphi)))[0] 406 401 yy = reform(gphi[cln MOD nx, *]) … … 422 417 endcase 423 418 ;-------------------------------------------------------------- 424 if NOT keyword_set(overplot) THEN axe, type, tempsmin, tempsmax, _EXTRA = ex ELSE BEGIN 425 if type EQ 'xt' then BEGIN 426 !y.range=!y.range-tempsmin 419 if NOT keyword_set(overplot) THEN axe, type, tempsmin, tempsmax, _EXTRA = ex ELSE BEGIN 420 if type EQ 'xt' then BEGIN 421 !y.range=!y.range-tempsmin 427 422 !y.tickv=!y.tickv-tempsmin 428 ENDIF ELSE BEGIN 423 ENDIF ELSE BEGIN 429 424 !x.range=!x.range-tempsmin 430 425 !x.tickv=!x.tickv-tempsmin … … 469 464 , coindescend = coindescendmask) 470 465 usetri = 1 471 ENDIF ELSE triangulation = -1 466 ENDIF ELSE triangulation = -1 472 467 IF size(gdep, /n_dimensions) EQ 2 THEN BEGIN 473 468 usetri = 2 … … 475 470 triangulation = triangule(mask, /basic, coinmonte = coinmontemask $ 476 471 , coindescend = coindescendmask) 477 ENDIF 472 ENDIF 478 473 ;---------------------------------------------------------------------- 479 474 pltbase, z2d, xx, yy, mask, xx, yy, level_z2d, colnumb, contour = contour, /noerase $ … … 488 483 endif 489 484 ;------------------------------------------------------------ 490 if keyword_set(contour) then BEGIN 485 if keyword_set(contour) then BEGIN 491 486 pourlegende = [1, 1, 1, 1] 492 487 oldattributs = saveatt() … … 506 501 IF key_onearth THEN BEGIN 507 502 CASE type OF 508 'xt':oplot, [180, 180] - 360*(!x.range[1] LT 180), !y.range 503 'xt':oplot, [180, 180] - 360*(!x.range[1] LT 180), !y.range 509 504 'yt':oplot, !x.range, [0, 0] 510 505 ELSE: … … 523 518 ; the top (right) axis by hand using axis. 524 519 ; 525 if n_elements(ex) NE 0 then BEGIN 520 if n_elements(ex) NE 0 then BEGIN 526 521 ; pour avoir un cadre de la couleur noire 527 522 if (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 then ex.COLOR = 0 … … 533 528 ; call axis for the missing axis. 534 529 IF type EQ 'xt' AND NOT keyword_set(endpoints) THEN BEGIN 535 if n_elements(ex) NE 0 then $ 530 if n_elements(ex) NE 0 then $ 536 531 if (where(tag_names(ex) EQ 'YTICKNAME'))[0] NE -1 then $ 537 532 ex.YTICKNAME = replicate(' ', n_elements(ex.YTICKNAME)) … … 540 535 ENDIF 541 536 IF (type EQ 'yt' OR type EQ 'zt') AND NOT keyword_set(endpoints) THEN BEGIN 542 if n_elements(ex) NE 0 then $ 537 if n_elements(ex) NE 0 then $ 543 538 if (where(tag_names(ex) EQ 'XTICKNAME'))[0] NE -1 then $ 544 539 ex.XTICKNAME = replicate(' ', n_elements(ex.XTICKNAME)) … … 564 559 if keyword_set(sty1d) then BEGIN ;if we want to make bars 565 560 IF strlowcase(strtrim(sty1d)) EQ 'bar' then begin 566 !y.range = [!y.range[0]-(!y.range[1]-!y.range[0])*.05,!y.range[1]] 561 !y.range = [!y.range[0]-(!y.range[1]-!y.range[0])*.05,!y.range[1]] 567 562 bar_plot, yy, background = (!d.n_colors-1) < 255, $ 568 563 baselines = replicate(!y.range[0], n_elements(yy)), barnames = ['', ''], $ 569 564 colors = replicate(col1d, n_elements(yy)), /outline 570 if n_elements(ex) NE 0 then BEGIN 565 if n_elements(ex) NE 0 then BEGIN 571 566 ; To have a black frame 572 567 if (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 then ex.COLOR = 0 … … 574 569 plot, [0], [0], /nodata, /noerase, _extra = ex 575 570 GOTO, fini 576 ENDIF 571 ENDIF 577 572 ENDIF 578 if NOT keyword_set(ov1d) then BEGIN 573 if NOT keyword_set(ov1d) then BEGIN 579 574 !y.range=[min-abs(max-min)/50.,max+abs(max-min)/50.] 580 575 legende,mi,ma,type, DIREC = direc, _extra = ex … … 596 591 ; use xstyle=1 then each axis (up and down) have majorticks with a 597 592 ; length of 1 (-> not very nice when xgridstyle=2), same if 598 ; xticklen=0.5 (not very nice in the middle). 593 ; xticklen=0.5 (not very nice in the middle). 599 594 ; => so we draw the top axis by hand using axis. 600 if n_elements(ex) NE 0 then BEGIN 595 if n_elements(ex) NE 0 then BEGIN 601 596 ; To have a black frame 602 597 if (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 then ex.COLOR = 0 … … 606 601 , ystyle = 1+8*keyword_set(exchange_xy), _extra = ex 607 602 ; call axis for the missing axis. 608 if n_elements(ex) NE 0 then BEGIN 603 if n_elements(ex) NE 0 then BEGIN 609 604 ; force tickname to blank array 610 605 if (where(tag_names(ex) EQ 'YTICKNAME'))[0] NE -1 AND keyword_set(exchange_xy) then ex.YTICKNAME = replicate(' ', n_elements(ex.YTICKNAME)) … … 619 614 fini: 620 615 ;------------------------------------------------------------ 621 ; we reput time axis in IDL julian days and not in julian days count from tempsmin 622 ;------------------------------------------------------------ 623 if type EQ 'xt' then BEGIN 624 !y.range=!y.range+tempsmin 616 ; we reput time axis in IDL julian days and not in julian days count from tempsmin 617 ;------------------------------------------------------------ 618 if type EQ 'xt' then BEGIN 619 !y.range=!y.range+tempsmin 625 620 !y.tickv=!y.tickv+tempsmin 626 ENDIF ELSE BEGIN 621 ENDIF ELSE BEGIN 627 622 !x.range=!x.range+tempsmin 628 623 !x.tickv=!x.tickv+tempsmin … … 640 635 ;------------------------------------------------------------ 641 636 if n_elements(key_performance) NE 0 then $ 642 IF key_performance EQ 1 THEN print, 'temps pltt', systime(1)-tempsun 637 IF key_performance EQ 1 THEN print, 'temps pltt', systime(1)-tempsun 643 638 ;------------------------------------------------------------ 644 639 ;------------------------------------------------------------ … … 646 641 return 647 642 end 648 649 -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltv.pro
r181 r231 1 ;------------------------------------------------------------2 1 ;+ 2 ; 3 3 ; @file_comments 4 4 ; Draw 2d plots with TV procedure … … 7 7 ; graphic 8 8 ; 9 ; @param DATA {in}{required} 9 ; @param DATA {in}{required} 10 10 ; The field we want to display can be: 11 11 ; 1) an array. If the array is not a 2D array, its mean along … … 13 13 ; (as it is done in plt). 14 14 ; 2) a structure respecting all criterions specified by 15 ; litchamp.pro.cf. IDL> xhelp,'litchamp'15 ; <pro>litchamp</pro> cf. IDL> xhelp,'litchamp' 16 16 ; 17 ; @param MIN {in}{optional}{default=min of DATA (on non-masked points)} 17 ; @param MIN {in}{optional}{default=min of DATA (on non-masked points)} 18 18 ; 19 ; @param MAX {in}{optional}{default=max of DATA (on non-masked points)} 19 ; @param MAX {in}{optional}{default=max of DATA (on non-masked points)} 20 20 ; 21 21 ; @keyword BOTTOM {default=0} 22 22 ; The lowest color index of the colors to be used 23 23 ; 24 ; @keyword BOXZOOM 25 ; Vector indicating the geographic zone on which we want to cut the map. 24 ; @keyword BOXZOOM 25 ; Vector indicating the geographic zone on which we want to cut the map. 26 26 ; If BOXZOOM has : 27 27 ; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] … … 54 54 ; 55 55 ; @keyword _EXTRA 56 ; used to pass keywords to PLACEDESSIN, TV, AXE, LEGENDE, BARRECOULEUR, TERMINEDESSIN57 ; 56 ; Used to pass keywords to <pro>PLACEDESSIN</pro>, <pro>TV</pro>, <pro>AXE</pro>, <pro>LEGENDE</pro>, <pro>BARRECOULEUR</pro>, <pro>TERMINEDESSIN</pro> 57 ; 58 58 ; @examples 59 59 ; IDL> tvplus, dist(100) … … 66 66 ; 67 67 ;- 68 ;-------------------------------------------------------------- 69 68 ; 70 69 PRO pltv, data, min, max, BOTTOM = bottom, BOXZOOM = boxzoom $ 71 70 , C_MASK = c_mask, C_NAN = c_nan, MININ = minin, MAXIN = maxin $ … … 82 81 ; I2) Reading of the field and checkup. 83 82 ;-------------------------------------------------------------- 84 IF n_elements(minin) NE 0 THEN min = minin 83 IF n_elements(minin) NE 0 THEN min = minin 85 84 IF n_elements(maxin) NE 0 THEN max = maxin 86 85 IF size(data, /type) NE 8 THEN z2d = reform(float(data)) ELSE z2d = data … … 90 89 saveboxparam, 'boxparam4pltv.dat' 91 90 ENDIF 92 z2d = checkfield(temporary(z2d), 'plt', TYPE = 'xy', direc = direc, BOXZOOM = boxzoom) 93 if z2d[0] EQ -1 then BEGIN 91 z2d = checkfield(temporary(z2d), 'plt', TYPE = 'xy', direc = direc, BOXZOOM = boxzoom) 92 if z2d[0] EQ -1 then BEGIN 94 93 IF keyword_set(savedbox) THEN restoreboxparam, 'boxparam4pltv.dat' 95 94 return … … 114 113 ;------------------------------------------------------------ 115 114 IF n_elements(maskval) EQ 0 THEN maskval = 1.e20 116 IF abs(maskval) LT 1e6 THEN BEGIN 115 IF abs(maskval) LT 1e6 THEN BEGIN 117 116 IF keyword_set(nan) THEN z2d[nanind] = 1.e20 118 msk = z2d NE maskval 119 ENDIF ELSE BEGIN 117 msk = z2d NE maskval 118 ENDIF ELSE BEGIN 120 119 IF keyword_set(nan) THEN z2d[nanind] = 0 121 120 msk = abs(z2d) LT abs(maskval)/10. … … 129 128 z2d = min > temporary(z2d) < max 130 129 ;------------------------------------------------------------ 131 ; apply other keywords (nointerp, c_nan, c_mask) 130 ; apply other keywords (nointerp, c_nan, c_mask) 132 131 ;------------------------------------------------------------ 133 132 IF NOT keyword_set(nointerp) THEN BEGIN … … 137 136 z2d = m * temporary(z2d) + p 138 137 ENDIF 139 ; set c_nan for NaN values 138 ; set c_nan for NaN values 140 139 IF keyword_set(nan) THEN BEGIN 141 140 IF n_elements(c_nan) NE 0 THEN cnan = 0 > c_nan < (ncolmax -1) ELSE cnan = (ncolmax -1) … … 143 142 ENDIF 144 143 ; c_mask for masked values 145 IF keyword_set(masked) THEN BEGIN 144 IF keyword_set(masked) THEN BEGIN 146 145 IF n_elements(c_mask) NE 0 THEN cmask = 0 > c_mask < (ncolmax - 1) ELSE cmask = (ncolmax -1) 147 146 z2d[maskind] = cmask 148 ENDIF 149 z2d = round(temporary(z2d)) 147 ENDIF 148 z2d = round(temporary(z2d)) 150 149 ; use byte type to save memory 151 150 z2d = byte(temporary(z2d)) … … 161 160 xsize = !p.position[2] - !p.position[0] 162 161 ysize = !p.position[3] - !p.position[1] 163 IF !d.name EQ 'X' THEN BEGIN 162 IF !d.name EQ 'X' THEN BEGIN 164 163 xsize = ceil(xsize * !d.x_size) 165 164 ysize = ceil(ysize * !d.y_size) 166 165 z2d = congrid(z2d, xsize, ysize) 167 166 ENDIF 168 167 169 168 tv, z2d, !p.position[0], !p.position[1] $ 170 169 , xsize = xsize, ysize = ysize $ … … 185 184 ;------------------------------------------------------------ 186 185 barrecouleur, 0, min, max, 10, bottom = bottom, position = posbar, ncolors = (topcol-bottom+1), _extra = ex 187 ; 4) End of drawing 188 terminedessin, _extra=ex 186 ; 4) End of drawing 187 terminedessin, _extra=ex 189 188 ; 190 189 if keyword_set(savedbox) THEN restoreboxparam, 'boxparam4pltv.dat' 191 if keyword_set(key_performance) NE 0 THEN print, 'time pltv', systime(1)-tempsun 190 if keyword_set(key_performance) NE 0 THEN print, 'time pltv', systime(1)-tempsun 192 191 ; 193 192 return -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltz.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 15 12 ; If the field is 2d, indicate, with the keyword BOXZOOM, geographic delineations of the boxzoom. 16 13 ; If the field is 3d, we extract the section on we average possibly before to do the plot. 17 ; 2) a structure respecting all criterions specified by litchamp.pro.14 ; 2) a structure respecting all criterions specified by <pro>litchamp</pro>. 18 15 ; See IDL> xhelp,'litchamp'. The array contained in the structure must be 2 or 3d (See case 1) 19 16 ; … … 89 86 ; 90 87 ; @keyword LABEL {default=0}{type=integer} 91 ; It choose the label's type corresponding to cases in label.pro.88 ; It choose the label's type corresponding to cases in <pro>label</pro> 92 89 ; Comment: When CONTOUR is activated, it only specify the label's type for colored isolines. 93 90 ; For these one traced by a trait, use CONTLABEL. … … 159 156 ; 160 157 ;- 161 ;------------------------------------------------------------ 162 ;------------------------------------------------------------ 163 ;------------------------------------------------------------ 164 pro pltz, tab, giventype, givenmin, givenmax, BOXZOOM = boxzoom, CONTOUR = contour $ 158 ; 159 PRO pltz, tab, giventype, givenmin, givenmax, BOXZOOM = boxzoom, CONTOUR = contour $ 165 160 , ENDPOINTS = endpoints, INTERVALLE = intervalle, INV = inv, ZRATIO = zratio $ 166 161 , CONTINTERVALLE = contintervalle, LABEL = label, CONTLABEL = contlabel $ … … 172 167 , WDEPTH = wdepth, REALSECTION = realsection $ 173 168 , _EXTRA = ex 174 ;---------------------------------------------------------175 ; include common176 169 ; 177 170 compile_opt idl2, strictarrsubs … … 483 476 return 484 477 end 485 486 487 -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/sbar_plot.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments 3 ; @file_comments 7 4 ; Same thing that bar_plot but compatible with the whole environment (common.pro included) 8 5 ; … … 16 13 ; 17 14 ; @keyword COLORS {type=integer} 18 ; I gives color of all colorbars. (contrarily to colors 15 ; I gives color of all colorbars. (contrarily to colors 19 16 ; which is a vector giving the color of each colorbar). 20 17 ; 21 18 ; @keyword NOREINITPLT 22 ; We active it if we do not want environment variables !p, !x, !y, !z 19 ; We active it if we do not want environment variables !p, !x, !y, !z 23 20 ; to be reinitializated by the procedure reinitplt 24 21 ; 25 22 ; @keyword _EXTRA 26 ; used to pass yourkeyword23 ; Used to pass keyword 27 24 ; 28 25 ; @uses 29 26 ; common.pro 30 27 ; 31 ; @restrictions 32 ; If NOREINITPLT is not activated, all environment 28 ; @restrictions 29 ; If NOREINITPLT is not activated, all environment 33 30 ; variables !p, !x, !y, !z are reinitializted by the procedure reinitplt 34 31 ; … … 46 43 ; 47 44 ;- 48 ;------------------------------------------------------------ 49 ;------------------------------------------------------------ 50 ;------------------------------------------------------------ 51 52 PRO sbar_plot, Values, COLORS = colors, NOREINITPLT = noreinitplt, _extra = ex 45 ; 46 PRO sbar_plot, Values, COLORS = colors, NOREINITPLT = noreinitplt, _extra = ex 53 47 ; 54 48 compile_opt idl2, strictarrsubs 55 49 ; 56 50 @common 57 ; 1) I reinitialize the graphic environment (variables !x, !y et !p): 58 if NOT keyword_set(NOREINITPLT) then reinitplt, _extra = ex 59 ; 2) I place the drawing on the screen like on the postscript 51 ; 1) I reinitialize the graphic environment (variables !x, !y et !p): 52 if NOT keyword_set(NOREINITPLT) then reinitplt, _extra = ex 53 ; 2) I place the drawing on the screen like on the postscript 60 54 IF chkstru(ex, 'overplot')EQ 0 THEN placedessin, 'autre', _extra = ex 61 ; 3) Drawing 55 ; 3) Drawing 62 56 if n_elements(COLORS) NE 0 then BEGIN 63 57 if n_elements(COLORS) EQ n_elements(Values) then col = colors $ … … 67 61 bar_plot, Values, background = !p.background, colors = col $ 68 62 , xstyle = 1, ystyle = 1, _extra = ex 69 ; 4) End of drawing 70 terminedessin, _extra=ex 63 ; 4) End of drawing 64 terminedessin, _extra=ex 71 65 72 66 return -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/scontour.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 15 12 ; 16 13 ; @keyword _EXTRA 17 ; used to pass yourkeywords14 ; Used to pass keywords 18 15 ; 19 16 ; @uses … … 33 30 ; 34 31 ;- 35 ;------------------------------------------------------------ 36 ;------------------------------------------------------------ 37 ;------------------------------------------------------------ 32 ; 38 33 PRO scontour, x, y, z, NOREINITPLT = noreinitplt, _EXTRA = ex 39 34 ; -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/splot.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 15 12 ; 16 13 ; @keyword _EXTRA 17 ; used to pass yourkeywords14 ; Used to pass keywords 18 15 ; 19 16 ; @uses … … 37 34 ; 38 35 ;- 39 ;------------------------------------------------------------ 40 ;------------------------------------------------------------ 41 ;------------------------------------------------------------ 36 ; 42 37 PRO splot, x, y, NOREINITPLT = noreinitplt, _EXTRA = ex 43 38 ; -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/tvplus.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 7 4 ; Enhanced version of tvscl 8 5 ; 9 ; @categories quick exploration of 2D arrays 6 ; @categories 7 ; quick exploration of 2D arrays 10 8 ; 11 9 ; @param Z2D {in}{required} … … 64 62 ; 65 63 ; @keyword _EXTRA 66 ; used to pass keywords to TV, PLOT, COLORBAR64 ; Used to pass keywords to <pro>TV</pro>, <pro>PLOT</pro>, <pro>COLORBAR</pro> 67 65 ; 68 66 ; @restrictions … … 87 85 ; 88 86 ;- 89 ;------------------------------------------------------------ 90 ;------------------------------------------------------------ 91 ;------------------------------------------------------------ 87 ; 92 88 PRO tvplus, z2d, cellsize, BOTTOM = bottom, C_MASK = c_mask, C_NAN = c_nan, WINDOW = window $ 93 89 , MIN = min, MAX = max, MASK = mask, OFFSET = offset, NOUSEINFOS = NOUSEINFOS $ 94 90 , NCOLORS = ncolors, NOINTERP = nointerp, _EXTRA = ex 95 ;96 91 ; 97 92 compile_opt idl2, strictarrsubs
Note: See TracChangeset
for help on using the changeset viewer.