使用 Python 在世界地图上绘制点
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13832562/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Using Python to plot points on a World Map
提问by user1835351
I want to make a earthquake world map app that pulls data from a us.gov text file and displays one earthquake at a time on the map as a dot. I know how to pull and parse the data, but I'm struggling with how to actually plot the points on the map. Can anyone tell me how they would do this with Python? I've done it with Java before by using an imported class called Zen.Java, is there an equivalent for Python?
我想制作一个地震世界地图应用程序,该应用程序从 us.gov 文本文件中提取数据,并在地图上一次将一次地震显示为一个点。我知道如何提取和解析数据,但我正在努力解决如何在地图上实际绘制点。谁能告诉我他们将如何用 Python 做到这一点?我之前通过使用名为 Zen.Java 的导入类使用 Java 完成了它,是否有 Python 的等价物?
采纳答案by Piti Ongmongkolkul
Take a look at matplotlib basemap http://matplotlib.org/basemap/
看看 matplotlib 底图 http://matplotlib.org/basemap/
and examples here http://matplotlib.org/basemap/users/examples.html
回答by erfelipe
Try pyGal. Its a nice lib for python, with many features. http://www.pygal.org/en/stable/documentation/types/maps/pygal_maps_world.html
试试 pyGal。它是一个很好的 Python 库,具有许多功能。http://www.pygal.org/en/stable/documentation/types/maps/pygal_maps_world.html

