Код: Выделить всё
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import cartopy.feature as cfeature
# Create a plot using the PlateCarree projection
fig, ax = plt.subplots(figsize=(10, 6), subplot_kw={'projection': ccrs.PlateCarree()})
# Set the extent for the Amazon region in regular latitude/longitude coordinates
ax.set_extent([-74, -32, -5, 15], crs=ccrs.PlateCarree())
# Add features to the map
ax.coastlines()
ax.add_feature(cfeature.BORDERS, linestyle=':')
# Add gridlines with labels
gl = ax.gridlines(draw_labels=True, linestyle='--', color='gray')
gl.top_labels = False # Disable top labels
gl.right_labels = False # Disable right-side labels
gl.xlabel_style = {'size': 10, 'color': 'black'}
gl.ylabel_style = {'size': 10, 'color': 'black'}
# Display the map
plt.show()

но я хочу повернуть вид, чтобы выровнять ось X с ориентацией побережья, указав координаты этого поля.

Подробнее здесь: https://stackoverflow.com/questions/790 ... or-cartopy