EOmaps
v6.5

How to use EOmaps:

  • 🌳 General
  • ⚙ Usage
    • 🚀 Basics
    • 🔴 Data Visualization
    • 🧰 Companion Widget
    • 🛸 Callbacks - make the map interactive!
    • 🛰 WebMap layers
    • 🌵 NaturalEarth features
    • 💠 Vector Data (or GeoDataFrames)
    • 🏕 Annotations, Markers, Lines, Logos, etc.
    • 📏 Scalebars
      • add_scalebar
      • print_code
        • ScaleBar.print_code()
      • apply_preset
      • remove
      • set_scale
      • set_n
      • set_position
      • set_label_props
      • set_scale_props
      • set_line_props
      • set_patch_props
      • set_auto_scale
      • set_pickable
      • set_size_factor
      • get_position
      • get_scale
      • get_size_factor
    • 🧭 Compass (or North Arrow)
    • ▦ Gridlines
    • 🦜 Utility widgets
    • 🔬 Inset-maps - zoom-in on interesting areas
    • ✏️ Draw Shapes on the map
    • 🏗️ Layout Editor
    • 📦 Reading data (NetCDF, GeoTIFF, CSV…)
    • 🔸 Miscellaneous
  • 👀 FAQ

Code-examples:

  • 🗺 EOmaps examples
EOmaps
  • ⚙ Usage
  • print_code
  • Edit on GitHub

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 Next

© Copyright . Revision 24638f54.

Built with Sphinx using a theme provided by Read the Docs.