I am currently using Basemap to plot some data. I would like the markersize to be defined by a list, but this throws an error.
Any idea how and I can show markers with varying sizes with a single function or method call?
m = Basemap(projection='mill',llcrnrlat=51.25,urcrnrlat=51.75,
llcrnrlon=-0.5,urcrnrlon=0.3,resolution='h')
m.drawcoastlines()
m.drawrivers(color='blue')
m.fillcontinents()
m.drawmapboundary()
m.drawcounties()
lat,lon,size = [51.5, 51.4], [0.1, 0], [2, 35]
x, y = m(lon,lat)
m.plot(lon, lat,'ro',markersize=size)
plt.show()
You are forwarding a list and not a values for the markersize. size=[2,35], try size[0]