geo_axes.scatter()
时间: 2023-09-14 16:15:47 浏览: 48
`geo_axes.scatter()` is a method used in the `mpl_toolkits.basemap` module of the `matplotlib` library in Python. This method is used to plot scatter points on a map projection. It takes in the longitude and latitude coordinates as input and can also take additional arguments such as marker style, size, color, etc.
Here's an example usage:
```python
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
m = Basemap(projection='merc', llcrnrlat=-80, urcrnrlat=80, llcrnrlon=-180, urcrnrlon=180)
fig = plt.figure(figsize=(10,8))
ax = fig.add_subplot(1,1,1)
# plot scatter points on the map
lons = [0, 45, -30, 80]
lats = [30, -20, 60, -40]
geo_axes = m(lons, lats)
m.scatter(geo_axes[0], geo_axes[1], marker='o', color='r', s=100)
# show the map
m.drawcoastlines()
m.drawcountries()
plt.title('Scatter Points on Map')
plt.show()
```
This will create a map with scatter points plotted at the specified longitude and latitude coordinates.