根据Basemap文档:A tuple (num_shapes, type, min, max) containing shape file info is
returned. num_shapes is the number of shapes, type is the type code
(one of the SHPT* constants defined in the shapelib module, see
http://shapelib.maptools.org/shp_api.html) and min and max are
4-element lists with the minimum and maximum values of the vertices.
If drawbounds=True a matplotlib.patches.LineCollection object is
appended to the tuple.
默认情况下,drawbounds是True,所以您所要做的就是收集readshapefile的返回值,并修改返回的LineCollection对象的linestyle,这可以用LineCollection.set_linestyle()完成。因此,原则上可以使用以下方法更改打印形状文件的线型:result = m.readshapefile('shapefiles/nic_autoc2018046n_pl_a', 'IceEdge', zorder = 10, color = 'blue')#, drawbounds = False)
col = result[-1]
col.set_linestyle('dotted')
plt.show()
但是&