[1199] | 1 | <HTML> |
---|
| 2 | <HEAD> |
---|
[1211] | 3 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8"/> |
---|
| 4 | <LINK REL="stylesheet" TYPE="text/css" HREF="../PyNCplot.css"/> |
---|
[1199] | 5 | </HEAD> |
---|
| 6 | |
---|
| 7 | </HEAD> |
---|
| 8 | <BODY> |
---|
| 9 | <DIV CLASS="valheader"> |
---|
| 10 | 2D shadow plot |
---|
| 11 | </DIV> |
---|
| 12 | <DIV CLASS="valimg"> |
---|
[1257] | 13 | Plotting a 2D field with shading |
---|
[1202] | 14 | <IMG WIDTH="100%" SRC="figs/tas_rainbow_auto.png"></IMG> |
---|
[1199] | 15 | </DIV> |
---|
| 16 | <DIV CLASS="valhelp"> |
---|
[1216] | 17 | draw_2D_shad(ncfile, values, varn)<BR> |
---|
| 18 | ncfile= file to use<BR> |
---|
| 19 | values=[vnamefs]:[dimvals]:[dimxvn]:[dimyvn]:[dimxyfmt]:[colorbarvals]:<BR> |
---|
| 20 | [sminv],[smaxv]:[figt]:[kindfig]:[reverse]:[mapv]:[close]<BR> |
---|
| 21 | [vnamefs]: Name in the figure of the variable to be shaded<BR> |
---|
[1231] | 22 | [dimvals]: ',' list of [dimname]|[value] telling at which dimension of the <BR> |
---|
| 23 | variable a given value is required (-1, all the length)<BR> |
---|
| 24 | [dimx/yvn]: name of the variables with the values of the final dimensions (x,y)<BR> |
---|
| 25 | [dimxyfmt]=[dxs],[dxf],[Ndx],[ordx],[dys],[dyf],[Ndy],[ordx]: format of the values at each axis (or 'auto')<BR> |
---|
| 26 | [dxs]: style of x-axis ('auto' for 'pretty')<BR> |
---|
| 27 | 'Nfix', values computed at even 'Ndx'<BR> |
---|
| 28 | 'Vfix', values computed at even 'Ndx' increments<BR> |
---|
| 29 | 'pretty', values computed following aprox. 'Ndx' at 'pretty' intervals (2.,2.5,4,5,10)<BR> |
---|
| 30 | [dxf]: format of the labels at the x-axis ('auto' for '%5g')<BR> |
---|
| 31 | [Ndx]: Number of ticks at the x-axis ('auto' for 5)<BR> |
---|
| 32 | [ordx]: angle of orientation of ticks at the x-axis ('auto' for horizontal)<BR> |
---|
| 33 | [dys]: style of y-axis ('auto' for 'pretty')<BR> |
---|
| 34 | [dyf]: format of the labels at the y-axis ('auto' for '%5g')<BR> |
---|
| 35 | [Ndy]: Number of ticks at the y-axis ('auto' for 5)<BR> |
---|
| 36 | [ordy]: angle of orientation of ticks at the y-axis ('auto' for horizontal)<BR> |
---|
| 37 | [colorbarvals]=[colbarn],[fmtcolorbar],[orientation]<BR> |
---|
| 38 | [colorbarn]: name of the color bar<BR> |
---|
| 39 | [fmtcolorbar]: format of the numbers in the color bar 'C'-like ('auto' for %6g)<BR> |
---|
| 40 | [orientation]: orientation of the colorbar ('vertical' (default, by 'auto'), 'horizontal')<BR> |
---|
| 41 | [smin/axv]: minimum and maximum value for the shading or:<BR> |
---|
| 42 | 'Srange': for full range<BR> |
---|
| 43 | 'Saroundmean@val': for mean-xtrm,mean+xtrm where xtrm = np.min(mean-min@val,max@val-mean)<BR> |
---|
| 44 | 'Saroundminmax@val': for min*val,max*val<BR> |
---|
| 45 | 'Saroundpercentile@val': for median-xtrm,median+xtrm where xtrm = np.min(median-percentile_(val),<BR> |
---|
| 46 | percentile_(100-val)-median)<BR> |
---|
| 47 | 'Smean@val': for -xtrm,xtrm where xtrm = np.min(mean-min*@val,max*@val-mean)<BR> |
---|
| 48 | 'Smedian@val': for -xtrm,xtrm where xtrm = np.min(median-min@val,max@val-median)<BR> |
---|
| 49 | 'Spercentile@val': for -xtrm,xtrm where xtrm = np.min(median-percentile_(val),<BR> |
---|
| 50 | percentile_(100-val)-median)<BR> |
---|
| 51 | [figt]: title of the figure ('|' for spaces)<BR> |
---|
| 52 | [kindfig]: kind of figure<BR> |
---|
| 53 | [reverse]: Transformation of the values<BR> |
---|
| 54 | * 'transpose': reverse the axes (x-->y, y-->x)<BR> |
---|
| 55 | * 'flip'@[x/y]: flip the axis x or y<BR> |
---|
| 56 | [mapv]: map characteristics: [proj],[res]<BR> |
---|
| 57 | see full documentation: <HREF CLASS="lc" HREF="http://matplotlib.org/basemap" TARGET="_blank">http://matplotlib.org/basemap</A><BR> |
---|
| 58 | [proj]: projection<BR> |
---|
| 59 | * 'cyl', cilindric<BR> |
---|
| 60 | * 'lcc', lambert conformal<BR> |
---|
| 61 | [res]: resolution:<BR> |
---|
| 62 | * 'c', crude<BR> |
---|
| 63 | * 'l', low<BR> |
---|
| 64 | * 'i', intermediate<BR> |
---|
| 65 | * 'h', high<BR> |
---|
| 66 | * 'f', full<BR> |
---|
| 67 | [close]: Whether figure should be finished or not<BR> |
---|
[1216] | 68 | varn= [varsn] name of the variable to plot with shading<BR> |
---|
[1199] | 69 | </DIV> |
---|
| 70 | <DIV CLASS="valins"> |
---|
[1403] | 71 | $ python ${pyHOME}/drawing.py -o draw_2D_shad -f wrfout_d01_2001-11-11_00:00:00 -S 'tas:west_east|-1,south_north|-1,Time|2:XLONG:XLAT:auto:rainbow,auto,auto:Srange,Srange:tas|at|2001-11-11|02|UTC:png:None:cyl,l:True' -v T2 |
---|
[1199] | 72 | </DIV> |
---|
| 73 | </BODY> |
---|
| 74 | </HTML> |
---|
| 75 | |
---|