Reputation: 154
How can I reduce the point size of a place I have plotted on the map with its coordinates using Basemap in Python?
The code for the plotting is:
m = Basemap(width=4000000,height=4000000,projection='lcc',
resolution='c',lat_1=45.,lat_2=55,lat_0=20,lon_0=80.)
m.drawmapboundary(fill_color='aqua')
m.drawcountries()
m.drawcoastlines(linewidth=0.50)
m.fillcontinents(color='green', alpha = 0.6, lake_color='aqua')
for i in range(len(lngtd)):
lon = lngtd[i]
lat = lattd[i]
xpt,ypt = m(lon,lat)
lonpt, latpt = m(xpt,ypt,inverse=True)
m.plot(xpt,ypt,'ro')
plt.show()
Upvotes: 0
Views: 362
Reputation: 2133
Adding full answer to future visitors. Add the markersize keyword to the line:
m.plot(xpt,ypt,'ro')
to make:
m.plot(xpt,ypt,'ro', ms="2.0")
Docs: https://matplotlib.org/api/_as_gen/matplotlib.pyplot.plot.html
Upvotes: 1