Changeset 2743 in lmdz_wrf
- Timestamp:
- Nov 4, 2019, 1:52:01 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing_tools.py
r2742 r2743 4401 4401 m = DefineMap(map_proj, map_res, [lat2, lon2]) 4402 4402 elif map_proj == 'spstere': 4403 m = DefineMap(map_proj, map_res, [xlat, -65.]) 4403 if len(mapv.split(',')) > 2: 4404 xlat = np.float(mapv.split(',')[2]) 4405 ref_lon = np.float(mapv.split(',')[3]) 4406 m = DefineMap(map_proj, map_res, [xlat, ref_lon]) 4407 else: 4408 m = DefineMap(map_proj, map_res, [xlat, -65.]) 4409 else: 4410 print errormsg 4411 print ' ' + fname + ": projection '" + map_proj + "' not ready !!" 4412 quit(-1) 4413 4414 4404 4415 if len(olon[:].shape) == 1: 4405 4416 lons, lats = np.meshgrid(olon[:], olat[:]) … … 4419 4430 Nboxes = len(boxesX)/4 4420 4431 for ibox in range(Nboxes): 4432 print ibox, boxesX[ibox], boxesY[ibox] 4421 4433 plt.plot(boxesX[ibox*4], boxesY[ibox*4], linestyle='-', linewidth=3, \ 4422 4434 label=gen.latex_text(boxlabels[ibox].replace('!',' ')), color=cols[ibox]) … … 4427 4439 plt.plot(boxesX[ibox*4+3], boxesY[ibox*4+3], linestyle='-', linewidth=3, \ 4428 4440 color=cols[ibox]) 4441 4442 lonlatb = [boxesX[ibox][0], boxesY[ibox][0], boxesX[ibox*4+2][0], \ 4443 boxesY[ibox*4+2][0]] 4444 labv = [gen.latex_text(boxlabels[ibox].replace('!',' ')), ] 4445 drawpolygon_map(lonlatb, m, labv, 10, ['k', 2, '-']) 4429 4446 4430 4447 m.drawcoastlines() … … 14390 14407 mape: basemap map environtment where to draw the polygon 14391 14408 polylabv: [polylab, color, size, face, angle, pos]: values for the label of 14392 the polygon 14409 the polygon. if color='auto', then: 14410 [polylab, 'k', 10, 'normal', angle=0, pos='c'] 14393 14411 polylab: label of the polygon (already LaTeX freindly, None for no label) 14394 14412 color: color of the characters … … 14455 14473 # Label location 14456 14474 if polylabv is not None: 14475 if polylabv[1] == 'auto': 14476 polylabv = [polylabv[0], 'k', 10, 'normal', angle=0, pos='c'] 14457 14477 polylabpos = polylabv[5].split(',') 14458 14478 if polylabpos[0] == 'c':
Note: See TracChangeset
for help on using the changeset viewer.