2024-09-27 00:21:23 发布
网友
如何在卫星轨道的基线图中重复绘制经度图?你知道吗
Like this map
为了有一个连续的卫星轨道,我尝试了不同的llcrnrlon和urcrnrlon。对于主值为180的集合llcrnrlon=-180和urcrnrlon(意图重复某些子午线),basemap不生成地图
llcrnrlon
urcrnrlon
180
llcrnrlon=-180
This is the current map of the satellite track
您可以将最小值-360传递给llcrnrlon,将最大值720传递给urcrnrlon(在更大的范围内Basemap会抱怨)。在这种设置下,Basemap的一些函数会产生重复的图像。最好只是举个例子:
-360
720
Basemap
from matplotlib import pyplot as plt from mpl_toolkits import basemap import numpy as np fig, ax = plt.subplots(figsize=(15,6)) lonmin = -360 lonmax = 720 latmin = -90 latmax = 90 ##setting up the map bmp = basemap.Basemap( ax=ax, llcrnrlat=latmin, llcrnrlon=lonmin, urcrnrlat=latmax, urcrnrlon=lonmax, ) bmp.drawcoastlines() bmp.drawcountries() bmp.drawmapboundary(fill_color='cyan') bmp.fillcontinents(color='coral') ##bmp.arcgisimage() < does not work ##bmp.bluemarble() < works to some extent ##drawing a fake track lons = np.linspace(lonmin, lonmax, 200) rads = lons/150*np.pi lats = np.sin(rads)*0.95*latmax bmp.plot(lons,lats, 'r ', lw=5) plt.show()
生成的图像如下所示:
如您所见,地图的最后一部分(右侧)不再绘制,因此最好将自己限制为urcrnrlon的最大值540。我还有两个背景图像函数。arcgisimage()抛出一个错误,即它无法处理跨越日边界的地图,但bluemarble()有效,即使只在较小的区域。如果您想让地图更频繁地重复,我认为您必须stitch将多个轴组合在一起,然后将数据拆分为多个部分,然后在相应的地图上绘制这些部分。你知道吗
540
arcgisimage()
bluemarble()
stitch
您可以将最小值
-360
传递给llcrnrlon
,将最大值720
传递给urcrnrlon
(在更大的范围内Basemap
会抱怨)。在这种设置下,Basemap
的一些函数会产生重复的图像。最好只是举个例子:生成的图像如下所示:
如您所见,地图的最后一部分(右侧)不再绘制,因此最好将自己限制为
urcrnrlon
的最大值540
。我还有两个背景图像函数。arcgisimage()
抛出一个错误,即它无法处理跨越日边界的地图,但bluemarble()
有效,即使只在较小的区域。如果您想让地图更频繁地重复,我认为您必须stitch
将多个轴组合在一起,然后将数据拆分为多个部分,然后在相应的地图上绘制这些部分。你知道吗相关问题 更多 >
编程相关推荐