Plotting a list of (lattitude, longitude, value)-tuples in Python?
-
20-06-2021 - |
Question
I have a list of (latitude, logitude, value)-Tuples I want to show using Basmap. What's the easiest way to do that?
data = [(1, 2, 0.12323),
(2, 5, 0.23232),
(4, 52,0.23131)
.
. tenthousand times this.
.
]
Solution
I haven't used basemap, but it looks like what you want is the scatter() method:
http://matplotlib.github.com/basemap/api/basemap_api.html#mpl_toolkits.basemap.Basemap.scatter
Which takes the same parameters as the matplotlib.pyplot.scatter method:
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.scatter
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow