pythonmatplotlibgeocodingmatplotlib-basemap

Plotting a list of (lattitude, longitude, value)-tuples in Python?


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:

    https://matplotlib.org/basemap/stable/users/examples.html

    Which takes the same parameters as the matplotlib.pyplot.scatter method:

    https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.scatter.html