-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Equatorial Lambert equal-area azimuthal projection? #2495
Comments
Would fig = plt.Figure(figsize=(6, 4))
# West Hemisphere
map_extent_west = (-180, 0, -90, 90)
map_proj_west = ccrs.LambertAzimuthalEqualArea(
central_longitude=-90.0,
central_latitude=0.0,
)
ax = fig.add_axes((0, 0, 0.45, 0.95), projection=map_proj_west)
ax.set_extent(map_extent_west, crs=ccrs.PlateCarree())
# East Hemisphere
map_extent_east = (0, 180, -90, 90)
map_proj_east = ccrs.LambertAzimuthalEqualArea(
central_longitude=90.0,
central_latitude=0.0,
)
ax = fig.add_axes((0.5, 0, 0.45, 0.95), projection=map_proj_east)
ax.set_extent(map_extent_east, crs=ccrs.PlateCarree())
for ax in fig.get_axes():
ax.stock_img()
ax.add_feature(cf.COASTLINE)
ax.gridlines()
fig.savefig("hemispheres.png", bbox_inches="tight") |
That isn't what I am looking for. I'm looking for the map to cut off at the defined horizon, so it is plotting just one hemisphere or the other, and it should be a circular image for each hemisphere, as in the example I provided. It is seen in Generic Mapping Tools here: https://docs.generic-mapping-tools.org/6.0/cookbook/map_projections.html#hemisphere-map |
How about calling fig = plt.Figure(figsize=(6, 4))
# West Hemisphere
map_proj_west = ccrs.LambertAzimuthalEqualArea(
central_longitude=-90.0,
central_latitude=0.0,
)
ax = fig.add_axes((0, 0, 0.45, 1), projection=map_proj_west)
ax.set_extent((-180, 0, -90, 90), crs=ccrs.PlateCarree())
boundary = mpath.Path([(-180, -90), (-180, 90), (0, 90), (0, -90)])
ax.set_boundary(boundary, transform=ccrs.PlateCarree())
# East Hemisphere
map_proj_east = ccrs.LambertAzimuthalEqualArea(
central_longitude=90.0,
central_latitude=0.0,
)
ax = fig.add_axes((0.5, 0, 0.45, 1), projection=map_proj_east)
ax.set_extent((0, 180, -90, 90), crs=ccrs.PlateCarree())
boundary = mpath.Path([(0, -90), (0, 90), (180, 90), (180, -90)])
ax.set_boundary(boundary, transform=ccrs.PlateCarree())
for ax in fig.get_axes():
ax.add_feature(cf.COASTLINE)
ax.gridlines()
fig.savefig("hemispheres.png", bbox_inches="tight") |
This works, thank you! |
Is there a way to do the equatorial Lambert equal-area azimuthal projection?
It should be like the Lambert equal-area azimuthal projection but with the option to set something like 'extent' to 90 degrees so it only plots one hemisphere, like the image below. Unfortunately I don't see how to do this with cartopy's projections.
The text was updated successfully, but these errors were encountered: