source: lmdz_wrf/trunk/tools/documentation/plotting/2Dshad_contdisc.html @ 2128

Last change on this file since 2128 was 2128, checked in by lfita, 6 years ago

Adding:

  • Documentation for `draw_2D_shad_contdisc'
  • Documentation for `draw_multiWindRose'
  • Documentation for `draw_stations_map'
  • Documentation for `draw_WRFeta_levels'
  • Adding 'Ncol' and 'runmean' into `draw_lines_time'
  • Documentation for `draw_2Dshad_map'
File size: 8.4 KB
Line 
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    &nbsp;&nbsp;  ncfiles= [contfilen];[contvarn];[dimxvarn];[dimvvarn];[dimvals]@[discfilen];<BR>
19    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[discvarn];[dimxvarn];[dimyvarn];[dimvals] files and variables to use<BR>
20    &nbsp;&nbsp;&nbsp;&nbsp;[contfilen]: name of the file with the continuous varible<BR>
21    &nbsp;&nbsp;&nbsp;&nbsp;[contvarn]: name of the continuos variable<BR>
22    &nbsp;&nbsp;&nbsp;&nbsp;[dimxvarn]: name of the variable with values for the x-dimension<BR>
23    &nbsp;&nbsp;&nbsp;&nbsp;[dimvvarn]: name of the variable with values for the y-dimension<BR>
24    &nbsp;&nbsp;&nbsp;&nbsp;[dimvals]: ',' list of [dimname]|[value] values to slice the variable:<BR>
25    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* [integer]: which value of the dimension<BR>
26    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* -1: all along the dimension<BR>
27    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* -9: last value of the dimension<BR>
28    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* [beg]@[end]@[inc] slice from [beg] to [end] every [inc]<BR>
29    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* NOTE, no dim name all the dimension size<BR>
30    &nbsp;&nbsp;&nbsp;&nbsp;[discfilen]: name of the file with the discrete varible<BR>
31    &nbsp;&nbsp;&nbsp;&nbsp;[discvarn]: name of the discrete variable<BR>
32    &nbsp;&nbsp;&nbsp;&nbsp;* NOTE: limits of the graph will be computed from the continuous variable<BR>
33    &nbsp;&nbsp;values=[vnamefs]:[dvarxn],[dvaryn]:[dimxyfmt]:[colorbarvals]:[sminv],[smaxv]:<BR>
34    &nbsp;&nbsp;&nbsp;&nbsp;[discvals]:[figt]:[kindfig]:[reverse]:[mapv]:[plotrange]:[close]<BR>
35    &nbsp;&nbsp;&nbsp;&nbsp;[vnamefs]: Name in the figure of the variable to be shaded<BR>
36    &nbsp;&nbsp;&nbsp;&nbsp;[dvarxn],[dvaryn]: name of the dimensions for the final x-axis and y-axis at <BR>
37    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the figure (from contfilen)<BR>
38    &nbsp;&nbsp;&nbsp;&nbsp;[dimxyfmt]=[dxs],[dxf],[Ndx],[ordx],[dys],[dyf],[Ndy],[ordx]: format of the <BR>
39    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values at each axis (or 'auto')<BR>
40    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dxs]: style of x-axis ('auto' for 'pretty')<BR>
41    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Nfix', values computed at even 'Ndx'<BR>
42    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Vfix', values computed at even 'Ndx' increments<BR>
43    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'pretty', values computed following aprox. 'Ndx' at 'pretty' intervals (2.,2.5,4,5,10)<BR>
44    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dxf]: format of the labels at the x-axis ('auto' for '%5g')<BR>
45    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Ndx]: Number of ticks at the x-axis ('auto' for 5)<BR>
46    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ordx]: angle of orientation of ticks at the x-axis ('auto' for horizontal)<BR>
47    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dys]: style of y-axis ('auto' for 'pretty')<BR>
48    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dyf]: format of the labels at the y-axis ('auto' for '%5g')<BR>
49    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Ndy]: Number of ticks at the y-axis ('auto' for 5)<BR>
50    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ordy]: angle of orientation of ticks at the y-axis ('auto' for horizontal)<BR>
51    &nbsp;&nbsp;&nbsp;&nbsp;[colorbarvals]=[colbarn],[fmtcolorbar],[orientation]<BR>
52    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[colorbarn]: name of the color bar<BR>
53    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[fmtcolorbar]: format of the numbers in the color bar 'C'-like ('auto' for %6g)<BR>
54    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[orientation]: orientation of the colorbar ('vertical' ['auto'], 'horizontal')<BR>
55    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* NOTE: single 'auto' for 'rainbow,%6g,vertical'<BR>
56    &nbsp;&nbsp;&nbsp;&nbsp;[smin/axv]: minimum and maximum values for the shading or string for each for:<BR>
57    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Srange': for full range<BR>
58    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Saroundmean@val': for mean-xtrm,mean+xtrm where <BR>
59    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xtrm = np.min(mean-min@val,max@val-mean)<BR>
60    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Saroundminmax@val': for min*val,max*val<BR>
61    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Saroundpercentile@val': for median-xtrm,median+xtrm where <BR>
62    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xtrm = np.min(median-percentile_(val),percentile_(100-val)-median)<BR>
63    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Smean@val': for -xtrm,xtrm where xtrm = np.min(mean-min*@val,max*@val-mean)<BR>
64    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Smedian@val': for -xtrm,xtrm where <BR>
65    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xtrm = np.min(median-min@val,max@val-median)<BR>
66    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Spercentile@val': for -xtrm,xtrm where <BR>
67    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xtrm = np.min(median-percentile_(val),percentile_(100-val)-median)<BR>
68    &nbsp;&nbsp;&nbsp;&nbsp;[discvals]= [type],[size],[lwidth],[lcol] characteristics of the points for the discrete field<BR>
69    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[type]: type of point. Any marker from matoplib must be filled !<BR>
70    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[size]: size of point <BR>
71    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[lwidth]: width of the line around the point<BR>
72    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[lcol]: color of the line around the point<BR>
73    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'auto': for [type]='o', [size]=5, [lwdith]=0.25, [lcol]='#000000'<BR>
74    &nbsp;&nbsp;&nbsp;&nbsp;[figt]: title of the figure ('!' for spaces)<BR>
75    &nbsp;&nbsp;&nbsp;&nbsp;[kindfig]: kind of figure output (ps, png, pdf)<BR>
76    &nbsp;&nbsp;&nbsp;&nbsp;[reverse]: Transformation of the values to plot<BR>
77    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'transpose': reverse the axes (x-->y, y-->x)<BR>
78    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'flip'@[x/y]: flip the axis x or y<BR>
79    &nbsp;&nbsp;&nbsp;&nbsp;[mapv]: map characteristics: [proj],[res]<BR>
80    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;see full documentation: http://matplotlib.org/basemap/<BR>
81    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[proj]: projection<BR>
82    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'cyl', cilindric<BR>
83    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'lcc', lambert conformal<BR>
84    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[res]: resolution of the coastaline data:<BR>
85    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'c', crude<BR>
86    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'l', low<BR>
87    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'i', intermediate<BR>
88    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'h', high<BR>
89    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'f', full<BR>
90    &nbsp;&nbsp;&nbsp;&nbsp;[plotrange]: range of the plot<BR>
91    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'strict': map covers only the minimum and maximum lon,lats from the <BR>
92    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;locations of the discrtete points<BR>
93    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'sponge,'[dlon],[dlat]: map covers an extended [dlon],[dlat] from the <BR>
94    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;minimum and maximum lon,lats from the locations of the discrtete points<BR>
95    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'fullcontinuous': map covers all the shadding area<BR>
96    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'lonlatbox,[lonSW],[latSW],[lonNE],[latNE]': plotted map only covers a lon,lat box<BR>
97    &nbsp;&nbsp;&nbsp;&nbsp;[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&nbsp;&nbsp;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&nbsp;&nbsp;-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&nbsp;&nbsp;None:cyl,i:lonlatbox,6.,44.,12.,48.5:yes'
104    </DIV>
105  </BODY>
106</HTML>
107
Note: See TracBrowser for help on using the repository browser.