[Python] `add_geometries` - how to automatically update extent of axis to include the geometry

Discussão em 'Python' iniciado por Stack, Agosto 12, 2025.

  1. Stack

    Stack Membro Participativo

    I want to draw shapes on a cartopy GeoAxis and have the extent of the plot automatically update so that all of the shapes are fully visible. Simply calling ax.add_geometries([shapes], crs, ...) does not update the plot extent to include the shape. What do I need to do to get the plot extent updated? I can't just use ax.set_extent on the union of all the shapes' bounding boxes because that won't take the projection into account.

    Continue reading...

Compartilhe esta Página