Skip to main content
Ctrl+K
EOmaps  documentation - Home EOmaps  documentation - Home
  • Installation
  • User guide
  • Examples
  • API Reference
  • Contribution Guide
  • FAQ
  • GitHub
  • PyPI
  • conda-forge
  • Installation
  • User guide
  • Examples
  • API Reference
  • Contribution Guide
  • FAQ
  • GitHub
  • PyPI
  • conda-forge

Section Navigation

  • Maps
    • Maps.f
    • Maps.ax
    • Maps.layer
    • Maps.crs_plot
    • Maps.data
    • Maps.data_specs
    • Maps.classify_specs
    • Maps.colorbar
    • Maps.new_map
    • Maps.new_inset_map
    • Maps.new_subplot
    • Maps.new_layer
    • Maps.new_layer_from_file
    • Maps.from_file
    • Maps.show_layer
    • Maps.fetch_layers
    • Maps.on_layer_activation
    • Maps.add_feature
    • Maps.add_wms
    • Maps.add_gdf
    • Maps.add_annotation
    • Maps.add_marker
    • Maps.add_line
    • Maps.add_logo
    • Maps.add_title
    • Maps.indicate_extent
    • Maps.add_compass
    • Maps.add_gridlines
    • Maps.add_scalebar
    • Maps.cb
    • Maps.cb.click
    • Maps.cb.pick
    • Maps.cb.keypress
    • Maps.cb.move
    • Maps.set_data
    • Maps.set_shape
    • Maps.set_classify
    • Maps.set_classify_specs
    • Maps.inherit_data
    • Maps.inherit_classification
    • Maps.plot_map
    • Maps.add_colorbar
    • Maps.make_dataset_pickable
    • Maps.set_extent
    • Maps.get_extent
    • Maps.set_extent_to_location
    • Maps.join_limits
    • Maps.savefig
    • Maps.snapshot
    • Maps.set_frame
    • Maps.subplots_adjust
    • Maps.edit_layout
    • Maps.get_layout
    • Maps.apply_layout
    • Maps.util
    • Maps.draw
    • Maps.edit_annotations
    • Maps.config
    • Maps.BM
    • Maps.delay_draw
    • Maps.fetch_companion_wms_layers
    • Maps.refetch_wms_on_size_change
    • Maps.cleanup
    • Maps.get_crs
    • Maps.read_file.GeoTIFF
    • Maps.read_file.NetCDF
    • Maps.read_file.CSV
    • Maps.show
    • Maps.redraw
    • Maps.copy
  • InsetMaps
    • InsetMaps.set_inset_position
    • InsetMaps.add_extent_indicator
    • InsetMaps.add_indicator_line
  • ColorBar
    • indicate_contours
    • remove
    • set_bin_labels
    • set_hist_size
    • set_labels
    • set_position
    • set_scale
    • set_visible
    • tick_params
    • layer
    • max_n_classify_bins_to_label
  • GridLines
    • add_labels
    • remove
    • set_auto_n
    • set_bounds
    • set_d
    • set_n
    • update_line_props
    • auto_n
    • bounds
    • d
    • layer
    • n
  • Compass
    • get_position
    • get_scale
    • remove
    • set_ignore_invalid_angles
    • set_patch
    • set_pickable
    • set_position
    • set_scale
  • ScaleBar
    • apply_preset
    • get_position
    • get_scale
    • get_size_factor
    • print_code
    • remove
    • set_auto_scale
    • set_label_props
    • set_line_props
    • set_n
    • set_patch_props
    • set_pickable
    • set_position
    • set_rotation
    • set_scale
    • set_scale_props
    • set_size_factor
  • API Reference
  • ScaleBar
  • print_code

print_code#

ScaleBar.print_code(fixed=True, return_str=False)#

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

Parameters:
  • fixed (bool, optional) –

    • If True, the returned command will produce a scalebar that is fixed with respect to its scale, and position.

    • If False, the command will produce a scalebar that autoscales itself with respect to the currently set autoscale parameters.

    The default is True.

  • return_str (bool, optional) – If True, the string is returned. If False, the string is only printed and None is returned. The default is False.

Returns:

code – A string of the command that will reproduce the scalebar.

Return type:

str

previous

get_size_factor

next

remove

On this page
  • ScaleBar.print_code()

This Page

  • Show Source

Created using Sphinx 8.0.2.

Built with the PyData Sphinx Theme 0.16.1.