如何在Matplotlib中绘制斑马样式轴

时间:2019-08-01 16:24:59

标签: python matplotlib cartopy

我想在zebra style中绘制类似于以下内容的轴:

Zebra border axis

下面是我的代码:

import matplotlib.pyplot as plt
import cartopy.io.shapereader as shpreader
import cartopy.crs as ccrs
from cartopy.feature  import ShapelyFeature

fig, ax = plt.figure(figsize=(12,9),  dpi=150 )
sFilename_shapefile = './some_shape.shp'
pShapeReader = shpreader.Reader(sFilename_shapefile)
pProjection_map = ccrs.PlateCarree()
aShapeFeature = ShapelyFeature(pShapeReader.geometries(), 
  pProjection_map, facecolor='grey', edgecolor='grey', 
  linewidth=0.5)
ax.add_feature(aShapeFeature, zorder = 4)
plt.show()

我得到的是这样的:

Normal border axis

0 个答案:

没有答案