Skip to content

METplotpy

METplotpy is the Python plotting library of the METplus ecosystem. It takes the numbers that verification tools produce — forecast-versus-observation statistics, and some diagnostic fields — and renders them as clean, reusable graphics: line and box plots, the classic verification diagrams, ensemble and probabilistic diagnostics, and a deep catalog of spatial, space-time, and specialized scientific plots. You drive it with a small YAML configuration file plus your data, and it writes a static image you can drop into a report or paper.

METplotpy is described by its authors as “a Python-based plotting library designed to generate a wide range of diagnostic and verification visualizations.” Put plainly: the verification tools in this ecosystem are very good at computing statistics, but a column of numbers is hard for a human to judge. METplotpy closes that gap — it exists to “help users interpret verification statistics through meaningful plots, making it easier to evaluate forecast performance and model behavior.”

A little vocabulary, defined on first use:

Verification statistic — A number that summarizes how well a forecast matched what was observed — a bias, a correlation, a hit rate, and so on. These are the primary input METplotpy plots.

Verification diagram — A standardized chart that encodes several statistics at once in a layout meteorologists recognize on sight — for example a performance diagram or a reliability diagram. METplotpy ships the classic set.

YAML configuration — A plain-text settings file (key/value pairs) that tells a plotting script what to read, which series to draw, and how the figure should look. It is how every METplotpy plot is parameterized.

METplotpy is written entirely in Python. Most plots are built with the plotly library; the performance diagram is built with matplotlib. It is developed and maintained by the Developmental Testbed Center (DTC) as one component of the larger METplus system.

Think of the ecosystem as an assembly line. Statistics are computed first; METplotpy is the stage that draws them. It does not by itself decide what a good forecast is — it faithfully visualizes whatever statistics it is handed, so the numbers stay the source of truth and the plot is the readable face of them.

  • Upstream of it sit the things that produce numbers: METcalcpy (the Python statistics engine METplotpy depends on) and MET itself, whose tools emit columnar ASCII statistics.
  • METplotpy reads those statistics together with a YAML config and emits a static image.
  • Around it sit the drivers: METplus can run it as a configured step, and METviewer uses it to render plots from a database of statistics. In fact the basic line plot is explicitly “used by METviewer for generating series plots.”

Every METplotpy plot follows the same shape: statistics + configuration go in, a static image comes out. The statistics come from MET / METcalcpy as columnar text; the configuration is one or more YAML files; the result is, by default, a PNG image.

METplotpy plotting pipeline Verification statistics from MET and METcalcpy, together with YAML configuration, flow into METplotpy, which renders a static plot such as a PNG or SVG image. INPUTS MET / METcalcpy columnar ASCII statistics Diagnostic fields gridded / point data YAML config defaults + custom METplotpy plotly · matplotlib OUTPUT Static plot PNG (default) · image
Figure 1. The pipeline: MET / METcalcpy statistics and diagnostic fields, paired with YAML configuration, flow into METplotpy, which renders a static image (PNG by default).

Configuration uses a layered scheme. Each plot ships a defaults file that is loaded automatically — for the line plot, line_defaults.yaml in metplotpy/plots/config — and you supply a small custom YAML file that overrides only the settings you care about. The output image is named by the plot_filename setting, and the default image type is PNG (the line plot’s plot_type defaults to png16m).

The standalone path is short. Using the basic line plot as the worked example:

  1. Prepare your data. Provide statistics as text output from MET in columnar format. The shipped sample lives at metplotpy/test/line/line.data — note the .data extension and tabular layout.
  2. Write a custom YAML config. Start from the plot’s defaults and override what you need in a file such as custom_line.yaml (point it at your data, choose the series, set plot_filename). The defaults file is merged in automatically.
  3. Run the plotting script. Each plot type is its own Python module — for the line plot: python metplotpy/plots/line/line.py custom_line.yaml.
  4. Collect the image. METplotpy writes the static plot (a PNG by default) to the path you set, ready for a report, paper, or dashboard.

The library’s reach is its main feature. Its own overview promises plots “including, for example but not limited to, box plots, bar plots, performance diagrams, reliability diagrams, and more.” The full set, grouped here by family for readability, is below — every name is taken faithfully from the User’s Guide table of contents.

FamilyPlot / diagramWhat it is for
Basic statistic plotsLine Plot, Bar plot, Box plot, Scatter Plot, Histogram Plots, Histogram_2d plotGeneral-purpose charts of statistics over a series, category, or distribution — the everyday workhorses, including a line plot that METviewer uses for series plots.
Verification diagramsPerformance Diagram, Reliability Diagram, ROC diagram, Taylor Diagram, Economic Cost/Lost Value (ECLV) PlotsThe classic, standardized verification charts that meteorologists read at a glance — skill, calibration, discrimination, multi-statistic comparison, and economic value.
Ensemble / probabilisticEnsemble spread-skill plotDiagnoses whether an ensemble’s spread (its stated uncertainty) matches its actual error — a core check of ensemble reliability.
Spatial & field plotsContour Plots, Skew-T Log-P Diagram, Wind Rose Diagram, Polar Ice PlotPlots of fields and soundings in space — filled/line contours, vertical thermodynamic profiles, wind direction/speed roses, and polar sea-ice maps.
Space-time & tropicalHovmoeller Plot, Spacetime (Cross-spectra) PlotDiagnostics that resolve structure jointly in space/longitude and time — Hovmöller diagrams and wavenumber-frequency cross-spectra.
S2S / climateWeather Regime plot, S2S Blocking plot, MJO Plots, MaKE MaKI Plots, Stratosphere Diagnostics Plots, Stratosphere plotsSubseasonal-to-seasonal and climate diagnostics — recurrent weather regimes, atmospheric blocking, the Madden-Julian Oscillation, MaKE/MaKI indices, and stratosphere diagnostics.
Tropical cycloneTCMPR Plots, TC-RMW Cross-section PlotTC-specific output: matched-pair (TCMPR) statistics for track/intensity, and radius-of-maximum-wind cross-sections of the storm structure.
Specialized diagnosticsDifficulty Index Plot, FV3 physics tendenciesTargeted scientific plots — a forecast difficulty index map and FV3 model physics-tendency diagnostics.

Two families are worth a closer look. The verification diagrams are the ones you will reach for most in a forecast-evaluation report; the spatial and space-time plots are where the more specialized science lives.


A derived, human-readable re-presentation — not official documentation. Sources: Overview · Installation · Line Plot