Skip to content
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

Messy conventions for gv.set_map_boundary and latitude sign for SouthPolarStereo projection #216

Open
senesis opened this issue Feb 15, 2024 · 2 comments
Labels
bug Something isn't working support Support request opened by outside user/collaborator

Comments

@senesis
Copy link

senesis commented Feb 15, 2024

Describe the bug
To get a south polar stereo map from lat = -40 to lat = -90, you must call
gv.set_map_boundary(ax, [-180, 180], [ -40, 90])
which is conter-intuitive

To Reproduce

fig = plt.figure(figsize=(8.5,11))
projection = ccrs.SouthPolarStereo()
ax = plt.axes(projection=projection)
ax.add_feature(cfeature.LAND, color='silver',zorder=1)
gv.set_map_boundary(ax, [-180, 180], [ -40, 90])
plt.show();

Expected behavior
Intuitive values for latitudes range should be
gv.set_map_boundary(ax, [-180, 180], [ -90,-40])
but this produces a blank map

And, by the way, the pole latitiude could be implicit for Polar Stereo projections!

OS:
see #210

Environment
see #210

@senesis senesis added bug Something isn't working support Support request opened by outside user/collaborator labels Feb 15, 2024
@tingvan
Copy link

tingvan commented Mar 27, 2024

Ive got the same problem, and I got this message:

AttributeError: module 'geocat.viz.util' has no attribute 'set_map_boundary'

It seems like this function has been removed.

Can someone help us?

@kafitzgerald
Copy link
Collaborator

@tingvan it sounds like you're seeing something different with the attribute error. Could you create a new issue with a minimal, reproducible, example to replicate the problem you're seeing. It would be great to see the imports, relevant code snippet, and Python environment info (conda list should give you this information) to help diagnose the problem.

We're looking into the original issue, i.e. making the map_boundary function more intuitive for use with south polar stereo projections.

As mentioned in the original issue, the following code achieves the desired outcome, but the required map_boundary settings are not intuitive:

import geocat.viz as gv
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import cartopy.feature as cfeature

fig = plt.figure(figsize=(8.5,11))
projection = ccrs.SouthPolarStereo()
ax = plt.axes(projection=projection)
ax.add_feature(cfeature.LAND, color='silver',zorder=1)
gv.set_map_boundary(ax, [-180, 180], [ -40, 90])
plt.show()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working support Support request opened by outside user/collaborator
Projects
None yet
Development

No branches or pull requests

3 participants