set_auto_scaleļƒ

ScaleBar.set_auto_scale(autoscale_fraction=0.25)ļƒ

Automatically evaluate an appropriate scale for the scalebar.

(and dynamically update the scale on pan/zoom events.)

Parameters:

autoscale_fraction (float, or None, optional) ā€“

The (approximate) fraction of the axis width to use as size for the scalebar in the autoscale procedure. Note that this is number is not exact since (depending on the crs) the final scalebar might be curved.

If None, the current scale is maintained. The default is 0.25.