Closed andrewfagerheim closed 2 years ago
You may need to provide the transform
argument to plot
. See https://earth-env-data-science.github.io/lectures/mapping_cartopy.html#adding-data-to-the-map
Can you plot the longitude vs latitude without using the map projection plt.plot(lon,lat)
? That will enable us to narrow down if the problem is with the data or is due to the projection details.
8 June 2022
@dhruvbalwada first said that I flipped the x and y axes: x should be longitude and y should be latitude. This correctly oriented the glider path (a problem I didn't know existed) but didn't solve either of the two problems outlined above.
9 June 2022
@dhruvbalwada then said it was probably an issue with the projection I was using. So I switched from using the Robinson projection to the Platte Carree projection and this seemed to fix both issues. Both the scale and location seem much more reasonable.
In general, you should always specify transform=ccrs.PlateCarree()
in your call to plot
if you data are specified in lat lon. That will allow you to use any projection. Try it with Robinson and see if it works.
Yes that worked, thanks for the help!! I think that can close this issue
8 June 2022
When I graphed the glider path using cartopy the results seemed both logically inconsistent and in the wrong place based on what Dhruv and I had discussed. There seemed to be two problems: