[2128] | 1 | <HTML> |
---|
| 2 | <HEAD> |
---|
| 3 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8"/> |
---|
| 4 | <LINK REL="stylesheet" TYPE="text/css" HREF="../PyNCplot.css"/> |
---|
| 5 | </HEAD> |
---|
| 6 | |
---|
| 7 | </HEAD> |
---|
| 8 | <BODY> |
---|
| 9 | <DIV CLASS="valheader"> |
---|
| 10 | 2D shadow plot with discontinous one |
---|
| 11 | </DIV> |
---|
| 12 | <DIV CLASS="valimg"> |
---|
| 13 | Plotting one continuous fields with shading and another discrete one with points |
---|
| 14 | <IMG WIDTH="100%" SRC="figs/obs-sim_sndmap_20121027000000_PRW_50lev_assigned.png"></IMG> |
---|
| 15 | </DIV> |
---|
| 16 | <DIV CLASS="valhelp"> |
---|
| 17 | draw_2D_shad_contdisc(ncfiles, values)<BR> |
---|
| 18 | ncfiles= [contfilen];[contvarn];[dimxvarn];[dimvvarn];[dimvals]@[discfilen];<BR> |
---|
| 19 | [discvarn];[dimxvarn];[dimyvarn];[dimvals] files and variables to use<BR> |
---|
| 20 | [contfilen]: name of the file with the continuous varible<BR> |
---|
| 21 | [contvarn]: name of the continuos variable<BR> |
---|
| 22 | [dimxvarn]: name of the variable with values for the x-dimension<BR> |
---|
| 23 | [dimvvarn]: name of the variable with values for the y-dimension<BR> |
---|
| 24 | [dimvals]: ',' list of [dimname]|[value] values to slice the variable:<BR> |
---|
| 25 | * [integer]: which value of the dimension<BR> |
---|
| 26 | * -1: all along the dimension<BR> |
---|
| 27 | * -9: last value of the dimension<BR> |
---|
| 28 | * [beg]@[end]@[inc] slice from [beg] to [end] every [inc]<BR> |
---|
| 29 | * NOTE, no dim name all the dimension size<BR> |
---|
| 30 | [discfilen]: name of the file with the discrete varible<BR> |
---|
| 31 | [discvarn]: name of the discrete variable<BR> |
---|
| 32 | * NOTE: limits of the graph will be computed from the continuous variable<BR> |
---|
| 33 | values=[vnamefs]:[dvarxn],[dvaryn]:[dimxyfmt]:[colorbarvals]:[sminv],[smaxv]:<BR> |
---|
| 34 | [discvals]:[figt]:[kindfig]:[reverse]:[mapv]:[plotrange]:[close]<BR> |
---|
| 35 | [vnamefs]: Name in the figure of the variable to be shaded<BR> |
---|
| 36 | [dvarxn],[dvaryn]: name of the dimensions for the final x-axis and y-axis at <BR> |
---|
| 37 | the figure (from contfilen)<BR> |
---|
| 38 | [dimxyfmt]=[dxs],[dxf],[Ndx],[ordx],[dys],[dyf],[Ndy],[ordx]: format of the <BR> |
---|
| 39 | values at each axis (or 'auto')<BR> |
---|
| 40 | [dxs]: style of x-axis ('auto' for 'pretty')<BR> |
---|
| 41 | 'Nfix', values computed at even 'Ndx'<BR> |
---|
| 42 | 'Vfix', values computed at even 'Ndx' increments<BR> |
---|
| 43 | 'pretty', values computed following aprox. 'Ndx' at 'pretty' intervals (2.,2.5,4,5,10)<BR> |
---|
| 44 | [dxf]: format of the labels at the x-axis ('auto' for '%5g')<BR> |
---|
| 45 | [Ndx]: Number of ticks at the x-axis ('auto' for 5)<BR> |
---|
| 46 | [ordx]: angle of orientation of ticks at the x-axis ('auto' for horizontal)<BR> |
---|
| 47 | [dys]: style of y-axis ('auto' for 'pretty')<BR> |
---|
| 48 | [dyf]: format of the labels at the y-axis ('auto' for '%5g')<BR> |
---|
| 49 | [Ndy]: Number of ticks at the y-axis ('auto' for 5)<BR> |
---|
| 50 | [ordy]: angle of orientation of ticks at the y-axis ('auto' for horizontal)<BR> |
---|
| 51 | [colorbarvals]=[colbarn],[fmtcolorbar],[orientation]<BR> |
---|
| 52 | [colorbarn]: name of the color bar<BR> |
---|
| 53 | [fmtcolorbar]: format of the numbers in the color bar 'C'-like ('auto' for %6g)<BR> |
---|
| 54 | [orientation]: orientation of the colorbar ('vertical' ['auto'], 'horizontal')<BR> |
---|
| 55 | * NOTE: single 'auto' for 'rainbow,%6g,vertical'<BR> |
---|
| 56 | [smin/axv]: minimum and maximum values for the shading or string for each for:<BR> |
---|
| 57 | 'Srange': for full range<BR> |
---|
| 58 | 'Saroundmean@val': for mean-xtrm,mean+xtrm where <BR> |
---|
| 59 | xtrm = np.min(mean-min@val,max@val-mean)<BR> |
---|
| 60 | 'Saroundminmax@val': for min*val,max*val<BR> |
---|
| 61 | 'Saroundpercentile@val': for median-xtrm,median+xtrm where <BR> |
---|
| 62 | xtrm = np.min(median-percentile_(val),percentile_(100-val)-median)<BR> |
---|
| 63 | 'Smean@val': for -xtrm,xtrm where xtrm = np.min(mean-min*@val,max*@val-mean)<BR> |
---|
| 64 | 'Smedian@val': for -xtrm,xtrm where <BR> |
---|
| 65 | xtrm = np.min(median-min@val,max@val-median)<BR> |
---|
| 66 | 'Spercentile@val': for -xtrm,xtrm where <BR> |
---|
| 67 | xtrm = np.min(median-percentile_(val),percentile_(100-val)-median)<BR> |
---|
| 68 | [discvals]= [type],[size],[lwidth],[lcol] characteristics of the points for the discrete field<BR> |
---|
| 69 | [type]: type of point. Any marker from matoplib must be filled !<BR> |
---|
| 70 | [size]: size of point <BR> |
---|
| 71 | [lwidth]: width of the line around the point<BR> |
---|
| 72 | [lcol]: color of the line around the point<BR> |
---|
| 73 | * 'auto': for [type]='o', [size]=5, [lwdith]=0.25, [lcol]='#000000'<BR> |
---|
| 74 | [figt]: title of the figure ('!' for spaces)<BR> |
---|
| 75 | [kindfig]: kind of figure output (ps, png, pdf)<BR> |
---|
| 76 | [reverse]: Transformation of the values to plot<BR> |
---|
| 77 | * 'transpose': reverse the axes (x-->y, y-->x)<BR> |
---|
| 78 | * 'flip'@[x/y]: flip the axis x or y<BR> |
---|
| 79 | [mapv]: map characteristics: [proj],[res]<BR> |
---|
| 80 | see full documentation: http://matplotlib.org/basemap/<BR> |
---|
| 81 | [proj]: projection<BR> |
---|
| 82 | * 'cyl', cilindric<BR> |
---|
| 83 | * 'lcc', lambert conformal<BR> |
---|
| 84 | [res]: resolution of the coastaline data:<BR> |
---|
| 85 | * 'c', crude<BR> |
---|
| 86 | * 'l', low<BR> |
---|
| 87 | * 'i', intermediate<BR> |
---|
| 88 | * 'h', high<BR> |
---|
| 89 | * 'f', full<BR> |
---|
| 90 | [plotrange]: range of the plot<BR> |
---|
| 91 | 'strict': map covers only the minimum and maximum lon,lats from the <BR> |
---|
| 92 | locations of the discrtete points<BR> |
---|
| 93 | 'sponge,'[dlon],[dlat]: map covers an extended [dlon],[dlat] from the <BR> |
---|
| 94 | minimum and maximum lon,lats from the locations of the discrtete points<BR> |
---|
| 95 | 'fullcontinuous': map covers all the shadding area<BR> |
---|
| 96 | 'lonlatbox,[lonSW],[latSW],[lonNE],[latNE]': plotted map only covers a lon,lat box<BR> |
---|
| 97 | [close]: Whether figure should be finished or not<BR> |
---|
| 98 | </DIV> |
---|
| 99 | <DIV CLASS="valins"> |
---|
| 100 | $ python ${pyHOME}/drawing.py -o draw_2D_shad_contdisc -f 'simcdx_vars_cape_50lev_assigned.nc;PRW;LON;LAT;<BR> |
---|
| 101 | Time|23,time|23,west_east|-1,south_north|-1@all_sounding_1D.nc;prw;stslon;stslat;time|14,lon|-1,lat|-1'<BR> |
---|
| 102 | -S 'PRW:west_east,south_north:auto:Blues,auto,auto:0.,35.:auto:obs!,!50leva!PRW!on!2012/10/27!00!UTC:png:<BR> |
---|
| 103 | None:cyl,i:lonlatbox,6.,44.,12.,48.5:yes' |
---|
| 104 | </DIV> |
---|
| 105 | </BODY> |
---|
| 106 | </HTML> |
---|
| 107 | |
---|