Jun-08-2022, 01:55 PM
I'm trying to show points on a map. For some reason, i get a map with a single point at the bottom left of the figure. I checked the coordinates and they are fine. I also tried to set other specific coordinate (which i know they must be in the area) and got the same thing. Anyone have an idea what could be the problem? Any help will be appreciated!
def event_trajectory(nclib,plib):
latslst,lonslst=([],[])
for i in plib:
lats,lons = latlon_coords(i[unravel_index(i.argmax(), i.shape)])
latslst.append(lats)
lonslst.append(lons)
bm = get_basemap(plib[5])
fig = plt.figure(figsize=(12,9))
bm.drawcoastlines(linewidth=0.25)
bm.drawstates(linewidth=0.25)
bm.drawcountries(linewidth=0.25)
plt.scatter(to_np(latslst),to_np(lonslst),marker = 'o', color='b',zorder=5)
plt.show()
