Reputation: 110
I'm new to basemap and map plots in general. After looking through documentation online, I was able to install basemap and GEOS no problem. I was able to setup my basemap map with the following code:
themap = Basemap(projection='gall',
resolution='i',
llcrnrlon = -135,
llcrnrlat = 23,
urcrnrlon = -60,
urcrnrlat = 50,
)
themap.drawcoastlines()
themap.drawcountries()
themap.drawstates()
themap.fillcontinents(color = 'gainsboro')
themap.drawmapboundary(fill_color='light blue')
This works fine and I get the map of the US exactly as I wanted:
Now I want to overlay my data. As a test, i'll just try to plot one random point with this code:
x,y = themap(37, -95)
themap.plot(x,y,'ko')
plt.show()
I get nothing but a blank canvas. Even my original map doesn't render now. There are no error messages, warnings or anything. So I don't know whats going wrong. I've run a lot of the examples from the examples directory of my basemap directory, and they all work fine. So i'm confused as to why i can't get this plot to show. Am I doing something obviously stupid?
Upvotes: 0
Views: 674
Reputation: 510
The order of the points should be (lon, lat). This is working for me:
Upvotes: 1