为什么散点图不能在曲目创建的地图上
plt.figure(figsize = (10,10),dpi =150)
ax = plt.axes(projection=ccrs.EuroPP())
ax.coastlines(resolution='50m')
ax.set_extent([-16., 5., 49., 61.])
plt.scatter([10.,15.],[52.5,55.],marker='o',s = 100,
transform = ccrs.EuroPP(), color = "red")
ax.gridlines(draw_labels=True)
plt.show()
为什么只有地图,散点图不能在地图上?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您指定的分散的转换应该是数据的投影,而不是地图的投影。看起来好像它们是LAT/LON值(EPSG:4326)? (从技术上讲,他们当然可以是Europp坐标,真的很接近起源)
您希望这些点或多或少地在哪里?
The transform you specify for the scatter should be the projection of the data, not the map. It looks as if they are lat/lon values (epsg:4326)? (Technically they could of course be EuroPP coordinates, just really close to the origin)
Where do you expect those points to be more or less?
根据源代码
绘制限制
是在代码的行中设置的: -值以仪表单位为投影坐标。
不在这些限制之外的散点点不会绘制。
According to the source code https://scitools.org.uk/cartopy/docs/v0.15/_modules/cartopy/crs.html#EuroPP
The
plotting limits
are set in the lines of code:-The values are in projection coordinates with meters unit.
The scatter points that fall outside these limits will not be plotted.