本文整理匯總了Python中cartopy.feature.COASTLINE屬性的典型用法代碼示例。如果您正苦於以下問題:Python feature.COASTLINE屬性的具體用法?Python feature.COASTLINE怎麽用?Python feature.COASTLINE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類cartopy.feature
的用法示例。
在下文中一共展示了feature.COASTLINE屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: receiver_locations
# 需要導入模塊: from cartopy import feature [as 別名]
# 或者: from cartopy.feature import COASTLINE [as 別名]
def receiver_locations(locs: pandas.DataFrame):
if not isinstance(locs, pandas.DataFrame):
return
if cartopy is not None:
ax = figure().gca(projection=cartopy.crs.PlateCarree())
ax.add_feature(cpf.LAND)
ax.add_feature(cpf.OCEAN)
ax.add_feature(cpf.COASTLINE)
ax.add_feature(cpf.BORDERS, linestyle=':')
else:
ax = figure().gca()
for name, loc in locs.iterrows():
if 15 <= loc.interval < 30:
c = 'g'
elif 5 <= loc.interval < 15:
c = 'o'
elif loc.interval < 5:
c = 'r'
else: # large or undefined interval
c = 'b'
if np.isfinite(loc.interval):
ax.scatter(loc.lon, loc.lat, s=1000*1/loc.interval, c=c, label=name)
else:
ax.scatter(loc.lon, loc.lat, c=c, label=name)