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 |
---|
11 | </DIV> |
---|
12 | <DIV CLASS="valimg"> |
---|
13 | Plotting one continuous fields with shading and another discrete one with points with a time-axis |
---|
14 | <IMG WIDTH="100%" SRC="figs/2Dshad_obs-sim_comparison_time.png"></IMG> |
---|
15 | </DIV> |
---|
16 | <DIV CLASS="valhelp"> |
---|
17 | draw_2D_shad_contdisc_time(ncfiles, values)<BR> |
---|
18 | ncfiles= [contfilen];[contvarn];[dimtvarn];[dimvvarn];[dimvals]@[discfilen];<BR> |
---|
19 | [discvarn];[dimtvarn];[dimvvarn];[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 | [dimtvarn]: name of the variable with values for the time-dimension<BR> |
---|
23 | [dimvvarn]: name of the variable with values for the variable-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];[varaxis];[timevals];[dimvfmt];[colorbarvals];[sminv],[smaxv];<BR> |
---|
34 | [discvals];[figt];[kindfig];[reverse];[mapv];[close]<BR> |
---|
35 | [vnamefs]: Name in the figure of the variable to be shaded<BR> |
---|
36 | [varaxis]: axis in the figure for the variable-axis ('x' or 'y')<BR> |
---|
37 | [timevals]: [units]|[kind]|[tfmt]|[label] time labels characteristics<BR> |
---|
38 | [units]: units string according to CF conventions ([tunits] since <BR> |
---|
39 | [YYYY]-[MM]-[DD] [[HH]:[MI]:[SS]], '!' for spaces), <BR> |
---|
40 | 'auto' for minutes!since!1949-12-01!00:00:00<BR> |
---|
41 | [kind]: kind of output<BR> |
---|
42 | 'Nval': according to a given number of values as 'Nval',[Nval]<BR> |
---|
43 | 'exct': according to an exact time unit as 'exct',[tunit]; <BR> |
---|
44 | tunit= [Nunits],[tu]; [tu]= 'c': centuries, 'y': year, 'm': month,<BR> |
---|
45 | 'w': week, 'd': day, 'h': hour, 'i': minute, 's': second, <BR> |
---|
46 | 'l': milisecond<BR> |
---|
47 | [tfmt]: desired format (combination of 'C'-style values and LaTeX)<BR> |
---|
48 | [label]: label at the graph ('!' for spaces, combination of 'C'-style <BR> |
---|
49 | values and LaTeX)<BR> |
---|
50 | [dimvfmt]=[[dvs],[dvf],[Ndv],[ordv]: format of the values at variable-axis <BR> |
---|
51 | (or 'auto')<BR> |
---|
52 | [dvs]: style of variable-axis ('auto' for 'pretty')<BR> |
---|
53 | 'Nfix', values computed at even 'Ndx'<BR> |
---|
54 | 'Vfix', values computed at even 'Ndx' increments<BR> |
---|
55 | 'pretty', values computed following aprox. 'Ndx' at 'pretty' intervals (2.,2.5,4,5,10)<BR> |
---|
56 | [dvf]: format of the labels at the var-axis ('auto' for '%5g')<BR> |
---|
57 | [Ndv]: Number of ticks at the var-axis ('auto' for 5)<BR> |
---|
58 | [ordv]: angle of orientation of ticks at the var-axis ('auto' for horizontal)<BR> |
---|
59 | [colorbarvals]=[colbarn],[fmtcolorbar],[orientation]<BR> |
---|
60 | [colorbarn]: name of the color bar<BR> |
---|
61 | [fmtcolorbar]: format of the numbers in the color bar 'C'-like ('auto' for %6g)<BR> |
---|
62 | [orientation]: orientation of the colorbar ('vertical' ['auto'], 'horizontal')<BR> |
---|
63 | * NOTE: single 'auto' for 'rainbow,%6g,vertical'<BR> |
---|
64 | [smin/axv]: minimum and maximum values for the shading or string for each for:<BR> |
---|
65 | 'Srange': for full range<BR> |
---|
66 | 'Saroundmean@val': for mean-xtrm,mean+xtrm where <BR> |
---|
67 | xtrm = np.min(mean-min@val,max@val-mean)<BR> |
---|
68 | 'Saroundminmax@val': for min*val,max*val<BR> |
---|
69 | 'Saroundpercentile@val': for median-xtrm,median+xtrm where <BR> |
---|
70 | xtrm = np.min(median-percentile_(val),percentile_(100-val)-median)<BR> |
---|
71 | 'Smean@val': for -xtrm,xtrm where xtrm = np.min(mean-min*@val,max*@val-mean)<BR> |
---|
72 | 'Smedian@val': for -xtrm,xtrm where <BR> |
---|
73 | xtrm = np.min(median-min@val,max@val-median)<BR> |
---|
74 | 'Spercentile@val': for -xtrm,xtrm where <BR> |
---|
75 | xtrm = np.min(median-percentile_(val),percentile_(100-val)-median)<BR> |
---|
76 | [discvals]= [type],[size],[lwidth],[lcol] characteristics of the points for the discrete field<BR> |
---|
77 | [type]: type of point. Any marker from matoplib must be filled !<BR> |
---|
78 | [size]: size of point <BR> |
---|
79 | [lwidth]: width of the line around the point<BR> |
---|
80 | [lcol]: color of the line around the point<BR> |
---|
81 | * 'auto': for [type]='o', [size]=5, [lwdith]=0.25, [lcol]='#000000'<BR> |
---|
82 | [figt]: title of the figure ('!' for spaces)<BR> |
---|
83 | [kindfig]: kind of figure output (ps, png, pdf)<BR> |
---|
84 | [reverse]: Transformation of the values to plot<BR> |
---|
85 | * 'transpose': reverse the axes (x-->y, y-->x)<BR> |
---|
86 | * 'flip'@[x/y]: flip the axis x or y<BR> |
---|
87 | [mapv]: map characteristics: [proj],[res]<BR> |
---|
88 | see full documentation: http://matplotlib.org/basemap/<BR> |
---|
89 | [proj]: projection<BR> |
---|
90 | * 'cyl', cilindric<BR> |
---|
91 | * 'lcc', lambert conformal<BR> |
---|
92 | [res]: resolution of the coastaline data:<BR> |
---|
93 | * 'c', crude<BR> |
---|
94 | * 'l', low<BR> |
---|
95 | * 'i', intermediate<BR> |
---|
96 | * 'h', high<BR> |
---|
97 | * 'f', full<BR> |
---|
98 | [close]: Whether figure should be finished or not<BR> |
---|
99 | </DIV> |
---|
100 | <DIV CLASS="valins"> |
---|
101 | $ python ${pyHOME}/drawing.py -o draw_2D_shad_contdisc_time -f 'simout_snddiags.nc;ta;time;pres;<BR> |
---|
102 | time|-1,pres|-1@UWyoming_snd_87576.nc;ta;time;pres;time|-1,pres|-1' -S 'ta;y;auto|exct,12,h|%d$^{%H}$|<BR> |
---|
103 | time!($[DD]^{[HH]}$);Vfix,auto,50.,auto;auto;Srange,Srange;auto;obs!&!sim!Ezeiza!airport!sounding;png;<BR> |
---|
104 | flip@y;None;yes' |
---|
105 | </DIV> |
---|
106 | </BODY> |
---|
107 | </HTML> |
---|
108 | |
---|