【发布时间】:2018-05-19 12:39:15
【问题描述】:
我想在basemap 实例上绘制一条连接等纬度 两点的线,使用圆锥形 地图投影(即纬度为不是直线)。
无论我使用m.drawgreatcircle 还是m.plot,生成的线都是两点之间的直线(-我认为...?)线,而不是沿着恒定的纬度。有谁知道如何解决这个问题?一些示例代码和生成的图像如下。我非常希望这条黄色虚线沿着 55N 线延伸。
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
#set up the map
m = Basemap(resolution='l',area_thresh=1000.,projection='lcc',\
lat_1=50.,lat_2=60,lat_0=57.5,lon_0=-92.5,\
width=6000000,height=4500000)
#add some basic map features
m.drawmeridians(np.arange(-155,-5,10),\
labels=[0,0,0,1],fontsize=8,linewidth=0.5)
m.drawparallels(np.arange(30,85,5),\
labels=[1,0,0,0],fontsize=8,linewidth=0.5)
m.drawcoastlines(linewidth=0.5)
m.drawcountries(linewidth=1)
m.drawstates(linewidth=0.3)
#plot some topography data
m.etopo()
#draw a line between two points of the same latitude
m.drawgreatcircle(-120,55,-65,55,linewidth=1.5,\
color='yellow',linestyle='--')
抱歉,如果我遗漏了一些非常简单的东西......!
【问题讨论】:
标签: python matplotlib gis matplotlib-basemap