2D Pseudocolor Contourf Plotting
Paste the following prompt into your AI chat to install this skill:
Install @user_4d898d59/701bhzz-draw-2d-contourf into your AI assistant according to https://skillhub.cn/install/skillhub.md.
About this skill
Problem
Scientific datasets are often 2D gridded fields, such as concentration, temperature, or flux over longitude and latitude. Direct contourf plots can have poor colorbars, log-scale failures from negative values, mixed land/invalid cells, and axes that are not publication-ready. This skill turns those repetitive formatting steps into a consistent workflow.
How It Works
The skill renders 2D pseudocolor maps with Matplotlib, using contourf or pcolormesh. Key capabilities:
- Colorbar control: supports log / linear levels, with log10 as the default or user-defined levels.
- Colormaps: uses built-in maps or custom segmented color definitions for journal styling.
- Masking: renders mask_value, NaN, or inf regions as a uniform background color.
- Coordinate formatting: optionally labels coordinates as °E / °N and normalizes axis labels, titles, and ticks.
- Output: produces high-resolution figures and supports PNG or PDF export.
Boundaries
Inputs x and y must form a regular grid, and z should have shape (len(y), len(x)). The skill plots Cartesian coordinates only; it does not perform map projection, coastline overlay, or geographic basemaps. In log mode, non-positive values are clipped or masked; for extremely large dynamic ranges, manual levels are recommended. It fits 2D field visualization such as concentration or temperature fields.
Use Cases
- Render longitude/concentration data as log contourf
- Mask land invalid cells for journal-style plots
- Format longitude/latitude axes for submission
- Use custom colormap for temperature field plot
Best For
- Atmospheric concentration-field students who need quick journal-ready 2D contourf plots
- Environmental modelers who need masked invalid values and log colorbars
- Journal submission engineers who need consistent coordinates, colorbars, and DPI
- Spatial data analysts who need custom colormaps for 2D field figures
Related Skills
Analyzes smart customer-service chat logs with semantic clustering to generate word clouds, Top K frequent questions, and personalized guess-you-ask recommendations.
Maps natural-language Reddit requests to KeyAPI REST workflows, validates endpoint contracts against official docs, and executes search, detail, comment, ranking, and report tasks.
Schedules fetching from NEP and custom academic sites, filters and ranks papers by keywords, generates Chinese summaries, and pushes Feishu cards with local download archiving.
Browser-based CSV/TXT visualizer with multi-Y-axis curves, smoothing, and PNG/JSON/CSV export.