Gallery#
The fplotlib gallery contains a collection of examples organized by topic, inspired by the matplotlib gallery but adapted to fplotlib’s native functionality and Fortran idioms.
Every example is a complete Fortran program from docs/gallery/ or its
subdirectories. The documentation build compiles each one against this
checkout of fplotlib with fpm, runs it,
and embeds the pictures it wrote – so what you see on the page is what
the code in front of you produces, in whichever format it asked for.
Use the download link at the bottom of an example to get the .f90 source,
then build it with:
fpm run --example <name>
Some examples also use the Fortran standard library,
the way a Python one would use numpy. For those, add stdlib = "*" to the
[dependencies] of your fpm.toml.
Gallery Sections#
The gallery is organized into the following topic areas:
Images, Contours and Fields — Visualization of multi-dimensional data, including images, contours, and vector fields.
Statistics — Statistical plotting techniques including error bars, confidence intervals, and data uncertainty visualization.
3D Plotting — Three-dimensional visualization including surface plots, scatter plots, and vector fields in 3D.
Subplots, Axes and Figures — Layout management, figure sizing, and axes control.
Text, labels and annotations — Text on a figure, including mathtext between dollar signs.
Animation — Animated GIFs built frame by frame.
Animation#
Animated figures. fplotlib collects frames with add_frame and encodes them
into a GIF or animated PNG with save_animation, with no external tool involved.
Images, Contours and Fields#
Examples in this section demonstrate how to visualize multi-dimensional data, including images, contours, and vector fields. This includes techniques for displaying structured and unstructured data with proper color mapping and field visualization.
3D Plotting#
Examples in this section demonstrate 3D visualization techniques, including surface plots, scatter plots, line plots in 3D space, and other three-dimensional visualization methods.
Statistics#
Examples in this section show statistical plotting techniques, including error bars, confidence intervals, and curve fitting. These examples demonstrate how to visualize uncertainty and statistical properties of data.
Subplots, Axes and Figures#
Examples in this section demonstrate layout and figure management, including creating multiple subplots, controlling figure size and aspect ratio, and managing axis properties and appearance.
Text, labels and annotations#
Text drawn on a figure, set in Lato. A fragment between dollar signs is mathtext: fplotlib lays it out itself, in Lete Sans Math with TeX’s layout, and needs no TeX installation.