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 line time |
---|
11 | </DIV> |
---|
12 | <DIV CLASS="valimg"> |
---|
13 | Plotting a 2D field with shading and a 1D field with a line where one of the axis has temporal values |
---|
14 | <IMG WIDTH="100%" SRC="figs/hus-ps_vert-sec_shad-line_time.png"></IMG> |
---|
15 | </DIV> |
---|
16 | <DIV CLASS="valhelp"> |
---|
17 | Plot of a shading 2D field and a 1D variable evolving in time |
---|
18 | draw_2D_shad_line(ncfile, values, varn)<BR> |
---|
19 | ncfile= [ncfiles],[ncfilel] file to use for the shading and for the line<BR> |
---|
20 | values= [vnamefs],[vnamefl]:[dimvals]:[dimxvn]:[dimyvn]:[dimxyfmt]:[colorbarvals]:[smin/axv]:[linevalues]:[figt]:[kindfig]:[reverse]:[mapv]:[close]<BR> |
---|
21 | [vnamefs]: Name in the figure of the variable to be shaded<BR> |
---|
22 | [vnamefl]: Name in the figure of the variable to be lined<BR> |
---|
23 | [dimvals]: ',' list of [dimname]|[value] telling at which dimension of the <BR> |
---|
24 | variable a given value is required (-1, all the length)<BR> |
---|
25 | [dimx/yvn]: name of the variables with the values of the final dimensions (x,y)<BR> |
---|
26 | [dimxyfmt]=[dxs],[dxf],[Ndx],[ordx],[dys],[dyf],[Ndy],[ordx]: format of the values at each axis (or 'auto')<BR> |
---|
27 | [dxs]: style of x-axis ('auto' for 'pretty')<BR> |
---|
28 | 'Nfix', values computed at even 'Ndx'<BR> |
---|
29 | 'Vfix', values computed at even 'Ndx' increments<BR> |
---|
30 | 'pretty', values computed following aprox. 'Ndx' at 'pretty' intervals (2.,2.5,4,5,10)<BR> |
---|
31 | [dxf]: format of the labels at the x-axis ('auto' for '%5g')<BR> |
---|
32 | [Ndx]: Number of ticks at the x-axis ('auto' for 5)<BR> |
---|
33 | [ordx]: angle of orientation of ticks at the x-axis ('auto' for horizontal)<BR> |
---|
34 | [dys]: style of y-axis ('auto' for 'pretty')<BR> |
---|
35 | [dyf]: format of the labels at the y-axis ('auto' for '%5g')<BR> |
---|
36 | [Ndy]: Number of ticks at the y-axis ('auto' for 5)<BR> |
---|
37 | [ordy]: angle of orientation of ticks at the y-axis ('auto' for horizontal)<BR> |
---|
38 | [colorbarvals]=[colbarn],[fmtcolorbar],[orientation]<BR> |
---|
39 | [colorbarn]: name of the color bar<BR> |
---|
40 | [fmtcolorbar]: format of the numbers in the color bar 'C'-like ('auto' for %6g)<BR> |
---|
41 | [orientation]: orientation of the colorbar ('vertical' (default, by 'auto'), 'horizontal')<BR> |
---|
42 | [smin/axv]: minimum and maximum value for the shading or:<BR> |
---|
43 | 'Srange': for full range<BR> |
---|
44 | 'Saroundmean@val': for mean-xtrm,mean+xtrm where xtrm = np.min(mean-min@val,max@val-mean)<BR> |
---|
45 | 'Saroundminmax@val': for min*val,max*val<BR> |
---|
46 | 'Saroundpercentile@val': for median-xtrm,median+xtrm where xtrm = np.min(median-percentile_(val),<BR> |
---|
47 | percentile_(100-val)-median)<BR> |
---|
48 | 'Smean@val': for -xtrm,xtrm where xtrm = np.min(mean-min*@val,max*@val-mean)<BR> |
---|
49 | 'Smedian@val': for -xtrm,xtrm where xtrm = np.min(median-min@val,max@val-median)<BR> |
---|
50 | 'Spercentile@val': for -xtrm,xtrm where xtrm = np.min(median-percentile_(val),<BR> |
---|
51 | percentile_(100-val)-median)<BR> |
---|
52 | [linevalues]=[colline],[sminl],[smaxl],[dls],[dlf],[Ndl],[ordl]<BR> |
---|
53 | [colline]: name of the color for the line<BR> |
---|
54 | [smin/axv]: minimum and maximum value for the line or:<BR> |
---|
55 | 'Srange': for full range<BR> |
---|
56 | 'Saroundmean@val': for mean-xtrm,mean+xtrm where xtrm = np.min(mean-min@val,max@val-mean)<BR> |
---|
57 | 'Saroundminmax@val': for min*val,max*val<BR> |
---|
58 | 'Saroundpercentile@val': for median-xtrm,median+xtrm where xtrm = np.min(median-percentile_(val),<BR> |
---|
59 | percentile_(100-val)-median)<BR> |
---|
60 | 'Smean@val': for -xtrm,xtrm where xtrm = np.min(mean-min*@val,max*@val-mean)<BR> |
---|
61 | 'Smedian@val': for -xtrm,xtrm where xtrm = np.min(median-min@val,max@val-median)<BR> |
---|
62 | 'Spercentile@val': for -xtrm,xtrm where xtrm = np.min(median-percentile_(val),<BR> |
---|
63 | percentile_(100-val)-median)<BR> |
---|
64 | [dls]: style of line-axis ('auto' for 'pretty')<BR> |
---|
65 | [dlf]: format of the labels at the line-axis ('auto' for '%5g')<BR> |
---|
66 | [Ndl]: Number of ticks at the line-axis ('auto' for 5)<BR> |
---|
67 | [ordl]: angle of orientation of ticks at the line-axis ('auto' for horizontal)<BR> |
---|
68 | [smin/axv]: minimum and maximum value for the shading<BR> |
---|
69 | [figt]: title of the figure ('|' for spaces)<BR> |
---|
70 | [kindfig]: kind of figure<BR> |
---|
71 | [reverse]: Transformation of the values<BR> |
---|
72 | * 'transpose': reverse the axes (x-->y, y-->x)<BR> |
---|
73 | * 'flip'@[x/y]: flip the axis x or y<BR> |
---|
74 | [timevals]: [timen]|[units]|[kind]|[tfmt]|[label]|[timeaxis] time labels characteristics |
---|
75 | [timen]; name of the time variable |
---|
76 | [units]; units string according to CF conventions ([tunits] since |
---|
77 | [YYYY]-[MM]-[DD] [[HH]:[MI]:[SS]], '!' for spaces) |
---|
78 | [kind]; kind of output |
---|
79 | 'Nval': according to a given number of values as 'Nval',[Nval] |
---|
80 | 'exct': according to an exact time unit as 'exct',[tunit]; |
---|
81 | tunit= [Nunits],[tu]; [tu]= 'c': centuries, 'y': year, 'm': month, |
---|
82 | 'w': week, 'd': day, 'h': hour, 'i': minute, 's': second, |
---|
83 | 'l': milisecond |
---|
84 | [tfmt]; desired format |
---|
85 | [label]; label at the graph ('!' for spaces) |
---|
86 | [close]: Whether figure should be finished or not<BR> |
---|
87 | varn= [varsn],[varnl] name of the variable to plot with shading and with line<BR> |
---|
88 | </DIV> |
---|
89 | <DIV CLASS="valins"> |
---|
90 | $ python ${pyHOME}/drawing.py -o draw_2D_shad_line_time -f wrfout_d01_2001-11-11_00:00:00,wrfout_d01_2001-11-11_00:00:00 -S 'hus,ps;west_east|10,south_north|96,Time|-1,bottom_top|-1;WRFtime;ZNU;auto;rainbow,auto,horizontal;Srange,Srange;k,Srange,Srange,auto,auto,auto,45.;vert.|sec.|hus|&|ps|at|x=10,y=96|temporal|evolution;png;flip@y;WRFtime|hours!since!1949-12-01!00:00:00|Nval,7|%H$^{%M}$|time!($[HH]^{[MM]}$);True' -v QVAPOR,PSFC |
---|
91 | </DIV> |
---|
92 | </BODY> |
---|
93 | </HTML> |
---|
94 | |
---|