| name | map |
| description | Use when the user asks for a map, especially a Cartopy-based geospatial plot or multi-panel map. Apply the established map style: include coastlines, country borders, land, and ocean on every panel; use selective outer-panel grid labels to reduce clutter; and preserve shared colorbar and subplot layout conventions. |
Map
Use this skill when the user asks for a map.
Default styling based on the provided Cartopy example:
- Use
cartopy.crs.PlateCarree(central_longitude=180) unless the task clearly needs a different projection.
- Set the map extent consistently across panels when comparing fields.
- Add these features to every panel:
ax.coastlines(linewidth=0.8)
ax.add_feature(cfeature.BORDERS, linestyle=":")
ax.add_feature(cfeature.LAND, facecolor="lightgray")
ax.add_feature(cfeature.OCEAN, facecolor="white")
Gridline and label rules for multi-panel layouts:
- Create gridlines with
draw_labels=True.
- Always hide top labels and right labels.
- Show left labels only on the left column.
- Show bottom labels only on the bottom row.
- For interior panels, hide the corresponding labels instead of dropping the gridliner entirely.
- If the goal is labels without visible grid lines, set:
gl.xlines = False
gl.ylines = False
Important distinction:
gl.left_labels and gl.bottom_labels control label visibility by subplot.
gl.xlines and gl.ylines control whether the grid lines themselves are drawn.
- If
gl.xlines / gl.ylines are not disabled, dashed grid lines will still appear on every panel.
Recommended multi-panel logic:
show_left = i % 2 == 0
show_bottom = i >= n_panels - ncols
gl.top_labels = False
gl.right_labels = False
gl.left_labels = show_left
gl.bottom_labels = show_bottom
For shared figure layout:
- Use a single shared colorbar for comparable panels.
- Keep subplot spacing tight with small
wspace and hspace.
- Put panel titles at the left with bold labels such as
a), b), etc.
When adapting or generating a map, preserve these conventions unless the user asks for a different style.