我想知道如何在Basemap中绘制爱尔兰的海岸线。我想使用Basemap绘制整个英国的情节,但我无法让爱尔兰的海岸线情节化。我还试过了map.drawcountries(linewidth = 0.2)
,map.fillcontinents(color = 'lightgray', zorder = 0)
和map.drawmapboundary(linewidth = 0.2)
,但这些都没有给我以后的海岸线。
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
map = Basemap(projection='merc', lat_0 = 55, lon_0 = -4,
resolution = 'i', area_thresh = 0.05,
llcrnrlon=-9, llcrnrlat=49,
urcrnrlon=2, urcrnrlat=61)
map.drawcoastlines(linewidth = 0.2, zorder = 0)
plt.show()
答案 0 :(得分:1)
我知道它有点晚了但你可以试试这个
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
fig, ax = plt.subplots()
map = Basemap(projection='merc', lat_0 = 53.866772, lon_0 = -5.23636,resolution = 'i', area_thresh = 0.05,llcrnrlon=-10.65073, llcrnrlat=49.16209,urcrnrlon=1.76334, urcrnrlat=61)
map.drawcoastlines(linewidth = 0.2, zorder = 0)
plt.show()