Я пытаюсь выяснить, как создать карту, которая пересекает линию даты с помощью Cartopy и ландшафта из img_tiles. Вот что у меня есть:
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
import cartopy.feature as cfeature
import cartopy.io.img_tiles as cimgt
import shapely.geometry as sgeom
my_dpi = 96
plt.figure(figsize=(1530/my_dpi, 900/my_dpi), dpi=my_dpi, frameon=False)
plt.subplots_adjust(left=0.0, right=1.0, top=1.0, bottom=0)
ax = plt.axes(projection=ccrs.Mercator(central_longitude=180))
terrain = cimgt.Stamen('terrain-background')
ax.add_image(terrain, 4)
states = cfeature.NaturalEarthFeature('cultural', 'admin_1_states_provinces', '10m', edgecolor='darkblue',facecolor='none')
ax.add_feature(states, linewidth = 0.1, linestyle='-')
# draw box
box = sgeom.box(minx=69, maxx=210, miny=-57, maxy=13.5)
ax.add_geometries([box], ccrs.PlateCarree(), facecolor='coral',
edgecolor='black', alpha=0.5)
# Set extent
ax.set_extent(oceania_coords, crs=ccrs.PlateCarree())
plt.show()
Когда я рисую рамку вокруг области, которую я хочу увеличить, она выглядит правильно.
![enter image description here](https://i.stack.imgur.com/cpeLV.png)
Когда я пытаюсь включить ax.set_extent в этом диапазоне, кажется, что все настройки установлены правильно, но все испорчено функциями img_tiles.
![enter image description here](https://i.stack.imgur.com/yOvjd.png)
Есть ли способ обойти это? Спасибо за помощь!