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 contour plot |
---|
11 | </DIV> |
---|
12 | <DIV CLASS="valimg"> |
---|
13 | Plotting a 2D field with shading and another one using contour lines |
---|
14 | <IMG WIDTH="100%" SRC="figs/huss-tas_Blues_shad-cont.png"></IMG> |
---|
15 | </DIV> |
---|
16 | <DIV CLASS="valhelp"> |
---|
17 | draw_2D_shad_cont(ncfile, values, varn)<BR> |
---|
18 | ncfile= [ncfilevars],[ncfilevarc] files to use (one value, same file)<BR> |
---|
19 | values=[vnamefs]:[dimvals]:[dimvalc]:[dimxvn]:[dimyvn]:[dimxyfmt]:[colorbarvals]:[ckind]:[clabfmt]:[sminv],[smaxv]:[sminc],[smaxv],[Nlev]:[figt]:[kindfig]:[reverse]:[mapv]:[close]<BR> |
---|
20 | [vnamefs],[vnamefc]: Name in the figure of the shaded and the contour variables<BR> |
---|
21 | [dimvals/c]: list of [dimname]|[value] telling at which dimension of the <BR> |
---|
22 | variable a given value is required (no dimension name, all the length)<BR> |
---|
23 | [dimx/yvn]: names of the variables with the values of the dimensions for the plot<BR> |
---|
24 | [dimxyfmt]=[dxf],[Ndx],[dyf],[Ndy]: format of the values at each axis<BR> |
---|
25 | [dxs]: style of x-axis ('auto' for 'pretty')<BR> |
---|
26 | 'Nfix', values computed at even 'Ndx'<BR> |
---|
27 | 'Vfix', values computed at even 'Ndx' increments<BR> |
---|
28 | 'pretty', values computed following aprox. 'Ndx' at 'pretty' intervals (2.,2.5,4,5,10)<BR> |
---|
29 | [dxf]: format of the labels at the x-axis<BR> |
---|
30 | [Ndx]: Number of ticks at the x-axis<BR> |
---|
31 | [ordx]: angle of orientation of ticks at the x-axis ('auto' for horizontal)<BR> |
---|
32 | [dys]: style of y-axis ('auto' for 'pretty')<BR> |
---|
33 | [dyf]: format of the labels at the y-axis<BR> |
---|
34 | [Ndy]: Number of ticks at the y-axis<BR> |
---|
35 | [ordy]: angle of orientation of ticks at the y-axis ('auto' for horizontal)<BR> |
---|
36 | [colorbarvals]=[colbarn],[fmtcolorbar],[orientation]<BR> |
---|
37 | [colorbarn]: name of the color bar<BR> |
---|
38 | [fmtcolorbar]: format of the numbers in the color bar 'C'-like ('auto' for %6g)<BR> |
---|
39 | [orientation]: orientation of the colorbar ('vertical' (default, by 'auto'), 'horizontal')<BR> |
---|
40 | [ckind]: kind of contours <BR> |
---|
41 | 'cmap': as it gets from colorbar<BR> |
---|
42 | 'fixc,[colname]': fixed color [colname], all stright lines<BR> |
---|
43 | 'fixsigc,[colname]': fixed color [colname], >0 stright, <0 dashed line<BR> |
---|
44 | [clabfmt]: format of the labels in the contour (None, also possible)<BR> |
---|
45 | [smin/axv]: minimum and maximum value for the shading or<BR> |
---|
46 | 'Srange': for full range<BR> |
---|
47 | 'Saroundmean@val': for mean-xtrm,mean+xtrm where xtrm = np.min(mean-min@val,max@val-mean)<BR> |
---|
48 | 'Saroundminmax@val': for min*val,max*val<BR> |
---|
49 | 'Saroundpercentile@val': for median-xtrm,median+xtrm where xtrm = np.min(median-percentile_(val),<BR> |
---|
50 | percentile_(100-val)-median)<BR> |
---|
51 | 'Smean@val': for -xtrm,xtrm where xtrm = np.min(mean-min*@val,max*@val-mean)<BR> |
---|
52 | 'Smedian@val': for -xtrm,xtrm where xtrm = np.min(median-min@val,max@val-median)<BR> |
---|
53 | 'Spercentile@val': for -xtrm,xtrm where xtrm = np.min(median-percentile_(val),<BR> |
---|
54 | percentile_(100-val)-median)<BR> |
---|
55 | [sminc]:[smaxv]:[Nlev]: minimum, maximum and number of values for the contour<BR> |
---|
56 | [figt]: title of the figure ('|' for spaces)<BR> |
---|
57 | [kindfig]: kind of figure<BR> |
---|
58 | [reverse]: does the values be transposed? 'True/False', <BR> |
---|
59 | [mapv]: map characteristics: [proj],[res]<BR> |
---|
60 | see full documentation: http://matplotlib.org/basemap/<BR> |
---|
61 | [proj]: projection<BR> |
---|
62 | * 'cyl', cilindric<BR> |
---|
63 | * 'lcc', lamvbert conformal<BR> |
---|
64 | [res]: resolution:<BR> |
---|
65 | * 'c', crude<BR> |
---|
66 | * 'l', low<BR> |
---|
67 | * 'i', intermediate<BR> |
---|
68 | * 'h', high<BR> |
---|
69 | * 'f', full<BR> |
---|
70 | [close]: Whether figure should be finished or not<BR> |
---|
71 | varn= [varsn],[varcn] name of the variable to plot with shading variable with contour<BR> |
---|
72 | </DIV> |
---|
73 | <DIV CLASS="valins"> |
---|
74 | $ python ${pyHOME}/drawing.py -o draw_2D_shad_cont -f wrfout_d01_2001-11-11_00:00:00 -S 'huss,tas:west_east|-1,south_north|-1,Time|2:Time|2:XLONG:XLAT:auto:Blues,auto,auto:fixc,r:%3g:Srange,Srange:260,300,9:huss|&|tas|at|2001-11-11|02|UTC:png:None:cyl,c:True' -v Q2,T2 |
---|
75 | </DIV> |
---|
76 | </BODY> |
---|
77 | </HTML> |
---|
78 | |
---|