我用matplotlib绘制了一张地图。我想要地图内所有网格点的坐标,而忽略地图之外的所有网格点。有什么方法可以直接用在这上面吗?Intertools提供了所有的网格点,但我只想要地图中的点。在
import matplotlib.pylab as pt
import itertools
pt.set_xticks(np.arange(65,100,.75))
pt.set_yticks(np.arange(0,100,.75))
gridpoints = list( itertools.product(xticks, yticks) )
print gridpoints
我不太清楚你想干什么,但我敢猜一猜。如果要在绘图上获取所有栅格线交点,可以尝试以下操作:
相关问题 更多 >
编程相关推荐