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

plot_map_cartopy creates maps without geographical axis #434

Open
cix1 opened this issue Sep 21, 2024 · 0 comments
Open

plot_map_cartopy creates maps without geographical axis #434

cix1 opened this issue Sep 21, 2024 · 0 comments

Comments

@cix1
Copy link

cix1 commented Sep 21, 2024

Hi all,

I noticed a bug in the visualisation of maps with cartopy. The plot_map_cartopy function creates maps without geographical axis. The part of the code that results in this issue is:

if not isinstance(ax, GeoAxesSubplot):
     ax = plt.subplot(ax.get_subplotspec(), projection=crs)
     # cax.clear()
     ax.set_axis_off()

I think this problem can be solved through the following adjustment:

if not isinstance(ax, GeoAxesSubplot):
    ax.set_axis_off()
    ax = plt.subplot(ax.get_subplotspec(), projection=crs)
    # cax.clear()
    ax.xaxis.set_visible(True)
    ax.yaxis.set_visible(True)

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant