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

Globe apparent size vs satellite_height (NearsidePerspective) #2487

Open
sergio-dr opened this issue Dec 2, 2024 · 0 comments
Open

Globe apparent size vs satellite_height (NearsidePerspective) #2487

sergio-dr opened this issue Dec 2, 2024 · 0 comments

Comments

@sergio-dr
Copy link

Description

Globe size seems to scale to fit the canvas even when changing satellite_height distance in NearsidePerspective. Of course, using matplotlib's sharex/sharey don't work for this purpose.

Can I represent the relative globe apparent size change with distance? Thanks in advance.

Code to reproduce

import matplotlib.pyplot as plt
import cartopy.crs as ccrs

fig = plt.figure(figsize=(20, 5), frameon=False)
projection1 = ccrs.NearsidePerspective(
    central_longitude=0,
    central_latitude=37,
    satellite_height=5e6,
)
projection2 = ccrs.NearsidePerspective(
    central_longitude=0,
    central_latitude=37,
    satellite_height=5e8,
)
ax1 = fig.add_subplot(1, 1, 1, projection=projection1)
ax2 = fig.add_subplot(1, 2, 2, projection=projection2)
ax1.stock_img()
ax2.stock_img()
plt.show()

image

import matplotlib.pyplot as plt
import cartopy.crs as ccrs

fig = plt.figure(figsize=(20, 5), frameon=False)

projection1 = ccrs.NearsidePerspective(
    central_longitude=0,
    central_latitude=37,
    satellite_height=5e6,
)
projection2 = ccrs.NearsidePerspective(
    central_longitude=0,
    central_latitude=37,
    satellite_height=5e8,
)
ax1 = fig.add_subplot(1, 1, 1, projection=projection1)
ax2 = fig.add_subplot(1, 2, 2, projection=projection2, sharex=ax1, sharey=ax1)
ax1.stock_img()
ax2.stock_img()
plt.show()

image

Operating system

Windows 11 23H2

Cartopy version

0.24.1

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