0
点赞
收藏
分享

微信扫一扫

【数据可视化应用】绘制气象地图(附Python代码)

夏侯居坤叶叔尘 2022-02-13 阅读 77

1.绘制兰勃脱投影的中国区域(包含南海子图):

import numpy as npimport xarray as xrimport matplotlib.pyplot as pltimport cartopy.crs as ccrsimport cartopy.feature as cfeaturefrom copy import copyfrom cartopy.mpl.gridliner import LATITUDE_FORMATTER, LONGITUDE_FORMATTERimport shapely.geometry as sgeom


def find_side(ls, side):    """ Given a shapely LineString which is assumed to be rectangular, return the line corresponding to a given side of the rectangle.
 """    minx, miny, maxx, maxy = ls.bounds    points = {'left': [(minx, miny), (minx, maxy)],              'right': [(maxx, miny), (maxx, maxy)],              'bottom': [(minx, miny), (maxx, miny)],              'top': [(minx, max
举报

相关推荐

0 条评论