Changeset 2713 in lmdz_wrf
- Timestamp:
- Sep 27, 2019, 5:05:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing_tools.py
r2710 r2713 135 135 linewidthsauto = [1.] 136 136 pointsizesauto = [7.] 137 138 139 # Getting colormap for fixed topobnds 140 fixtopobnds=[-140., 0., 100., 200., 300., 400., 500., 600., 700., 800., 900., 1000., \ 141 1500., 2000., 3000., 4000., 7000.] 142 RGBfixtopocolors = [[119,152,93], [149,181,112], [189,209,137], [233,238,154], \ 143 [248,242,168], [251,231,163], [252,225,144], [248,213,133], [251,189,141], \ 144 [231,175,139], [202,149,132], [206,156,149], [228,182,192], [250,214,231], \ 145 [224,224,224], [255,255,255], [255,255,255]] 146 147 # Topography 148 fixtopobndsS = [] 149 for t in fixtopobnds: fixtopobndsS.append(str(t)) 150 151 HEXfixtopocolors = [] 152 Nfixtopocolors = len(RGBfixtopocolors) 153 for ic in range(Nfixtopocolors): 154 rgbv = np.array(RGBfixtopocolors[ic], dtype=np.float)/255. 155 rgbv = np.where(rgbv > 0.1, rgbv - 0.1, 0.) 156 if np.all(rgbv == 0.9): rgbv = rgbv/0.9 157 158 hexcol = gen.coldec_hex(rgbv) 159 HEXfixtopocolors.append(hexcol) 160 161 fixtopocmap = mpl.colors.ListedColormap(HEXfixtopocolors) 162 fixtoponormc = mpl.colors.BoundaryNorm(fixtopobnds, fixtopocmap.N) 137 163 138 164 ####### Functions
Note: See TracChangeset
for help on using the changeset viewer.