cartopy.feature.AdaptiveScaler#
- class cartopy.feature.AdaptiveScaler(default_scale, limits)[source]#
Automatically select scale of geometries based on extent of plotted axes.
- Parameters:
default_scale – Coarsest scale used as default when plot is at maximum extent.
limits – Scale-extent pairs at which scale of geometries change. Must be a tuple of tuples ordered from coarsest to finest scales. Limit values are the upper bounds for their corresponding scale.
Example
>>> s = AdaptiveScaler('coarse', ... (('intermediate', 30), ('fine', 10))) >>> s.scale_from_extent([-180, 180, -90, 90]) 'coarse' >>> s.scale_from_extent([-5, 6, 45, 56]) 'intermediate' >>> s.scale_from_extent([-5, 5, 45, 56]) 'fine'