Skip to content

Comprehensive API Reference

This is the complete list of every single parameter accepted by plot_map_r().

plot_map_r(...)

Data Layers

  • raster_data (str, optional): Path to .tif raster file.
  • vector_data (str, optional): Path to the primary .shp vector file.
  • vector_column (str, optional): If provided, colors the primary vector by this column.
  • vector_discrete (bool): Set True if vector_column is categorical. Default False.
  • extra_vectors (list of dict, optional): Infinite layers. Example: [{"data": "swamp.shp", "name": "Swamp", "fill": "#2d5a27"}].

Point Layers

  • points_data (str, optional): Path to point .shp or .csv.
  • points_color_column (str, optional): Column to color points.
  • points_label_column (str, optional): Column to draw repelled text labels.
  • points_discrete (bool): Set True if color column is categorical. Default True.

Styling

  • theme (str): "natgeo_minimalist", "dark_matter", or "retro_blueprint". Default "natgeo_minimalist".
  • colormap (str): "elevation", "neon", "blueprint", etc. Default "elevation".
  • orientation (str): "auto", "portrait", or "landscape". Default "auto".

Map Elements

  • title (str): Main header.
  • subtitle (str): Sub header.
  • author (str): Footer row 1.
  • date_str (str): Footer row 2.
  • data_source (str): Footer row 3.
  • crs_text (str): Footer row 4.

Toggles

  • show_coords (bool): Show lat/long grid. Default True.
  • scale_bar (bool): Show distance scale. Default True.
  • north_arrow (bool): Show compass arrow. Default True.

Insets

  • inset_map (str, optional): Path to vector file for the floating inset map.
  • inset_position (list of float): [x, y] coordinates from 0 to 1. Default [0.7, 0.7].
  • inset_scale (float): Size of inset relative to canvas. Default 0.25.

Output

  • output_path (str): The save destination. Default "output_map.png".

Released under the MIT License.