Cartographic Elements
A professional map isn't just data; it's the metadata surrounding it. geoplot-themes provides out-of-the-box parameters to add all standard cartographic elements without writing a single line of layout code.
Main Title & Subtitle
Use title and subtitle to define the main headers. The styling and fonts are automatically handled by the active theme.
gpt.plot_map_r(
raster_data="erosion.tif",
title="Global Erosion Probability",
subtitle="Model year 2026. Highlighting critical risk zones.",
)The Footer (Caption)
Professional maps require citations. You can fill out the bottom-left caption using these four parameters:
gpt.plot_map_r(
raster_data="erosion.tif",
author="Perur Geospatial Solutions",
date_str="October 2026",
data_source="NASA Earth Observatory",
crs_text="WGS 84 / UTM Zone 37N"
)This will automatically format into a neat block:
Map Created By: Perur Geospatial Solutions
Date: October 2026
Data Source: NASA Earth Observatory
Coordinate System: WGS 84 / UTM Zone 37NScale Bar & North Arrow
The package uses ggspatial to draw highly accurate geographic scale bars and north arrows.
They are enabled by default, but you can toggle them:
gpt.plot_map_r(
raster_data="erosion.tif",
scale_bar=True, # Draws a dynamic scale bar at the bottom right
north_arrow=True, # Draws a directional arrow above the scale bar
)Note: The styling of the scale bar (light/dark) automatically adapts to your chosen theme!
Coordinate Grid (Graticules)
You can toggle the latitude/longitude grid lines and their axis labels using show_coords.
gpt.plot_map_r(
raster_data="erosion.tif",
show_coords=True # Will draw the grid and the 0.04°N labels
)