ScaleBar

class eomaps.scalebar.ScaleBar(m, preset=None, scale=None, n=10, autoscale_fraction=0.1, auto_position=(0.75, 0.25), size_factor=1, scale_props=None, patch_props=None, label_props=None, line_props=None, layer=None)

Base class for EOmaps scalebars.

Methods

__init__(m[, preset, scale, n, ...])

Add a scalebar to the map.

apply_preset(preset)

Apply a style-preset to the Scalebar.

get_position()

Return the current position (and orientation) of the scalebar.

get_scale()

Get the currently used scale of the scalebar.

get_size_factor()

Get the current size-factor of the scalebar.

print_code([fixed, return_str])

Print the command that will reproduce the scalebar in its current state.

remove()

Remove the scalebar from the map.

set_auto_scale([autoscale_fraction])

Automatically evaluate an appropriate scale for the scalebar.

set_label_props([scale, rotation, every, ...])

Set the style properties of the labels.

set_line_props([update])

Set the style properties of the lines connecting the scale and the labels.

set_n([n])

Set number of segments to use for the scalebar.

set_patch_props([offsets])

Set the style properties of the background patch.

set_pickable(q)

Set if the scalebar is interactive (True) or not (False).

set_position([pos, auto_pos, azim])

Set the position of the colorbar.

set_scale([scale])

Set the length of a segment of the scalebar in meters.

set_scale_props([width, colors])

Set the style properties of the scale.

set_size_factor(s)

Set the size_factor that is used to adjust the size of the labels.