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

sharex, sharey do not work for geographic plot #199

Closed
kinyatoride opened this issue Jun 26, 2020 · 1 comment
Closed

sharex, sharey do not work for geographic plot #199

kinyatoride opened this issue Jun 26, 2020 · 1 comment

Comments

@kinyatoride
Copy link

Description

Changing the parameters of sharex, sharey do not work for geographic plot.
Thanks always.

Steps to reproduce

import proplot as plot

fig, axs = plot.subplots(ncols=2, nrows=2, proj='cyl', share=3)
axs.format(coast=True, labels=True)

Actual behavior: [What actually happened]
Screen Shot 2020-06-26 at 8 09 27

Equivalent steps in matplotlib

import numpy as np
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter

fig, axes = plt.subplots(2, 2, sharex=True, sharey=True,
                subplot_kw=dict(projection=ccrs.PlateCarree()))

xticks = np.linspace(-180, 180, 7)
yticks = np.linspace(-90, 90, 7)
for ax in axes.flat:
    ax.coastlines()
    ax.gridlines(xlocs=xticks, ylocs=yticks, linestyle='--', alpha=0.5)
    ax.set_xticks(xticks, crs=ccrs.PlateCarree())
    ax.set_yticks(yticks, crs=ccrs.PlateCarree())
    ax.xaxis.set_major_formatter(LongitudeFormatter(zero_direction_label=True))
    ax.yaxis.set_major_formatter(LatitudeFormatter())

Screen Shot 2020-06-26 at 8 09 06

Proplot version

0.6.4

@lukelbd
Copy link
Collaborator

lukelbd commented Jun 26, 2020

Duplicate of: #79, #178 (see also #183)

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

No branches or pull requests

2 participants