Examples

Examples Gallery

Visual examples with source code. Run any example:

make example ARGS="example_name"
3D Animation Demo Animate a rotating 3D Lissajous curve. The same FuncAnimation plus save_animation pipeline writes both MP4...
3D Plotting 3D Plotting 3D plotting (lines and surfaces) with axes, ticks, and labels.
Animation Generate an MP4 animation from a sequence of frames. The demo writes output/example/fortran/animation/animation.mp4.
Annotation Demo Annotation Demo Add text annotations in data coordinates.
Ascii Heatmap Render a heatmap to terminal-friendly ASCII output.
Bar Chart Demo Bar Chart Demo Demonstrates grouped bar charts (vertical and horizontal) via both the stateful API and figure_t.
Basic Plots Basic Plots Basic line plots and saving outputs (PNG, PDF, ASCII).
Boxplot Demo Boxplot Demo Demonstrates box-and-whisker plots for statistical data visualization.
Contour Demo Contour Demo Comprehensive contour plotting examples: line contours, filled contours, custom levels, colormaps.
Datetime Axis Demo Datetime Axis Demo Date and time axes using datetime_t values and formatted tick labels.
Disconnected Lines Disconnected Lines Line plots with gaps created by NaN separators.
Display Demo Display Demo show_viewer() opens a PDF viewer. show() uses the viewer when a GUI is available, and ASCII output otherwise.
Dpi Demo Dpi Demo Control output DPI when saving figures for consistent sizing across formats.
Errorbar Demo Errorbar Demo Demonstrates error bar plotting with both symmetric and asymmetric errors for scientific data visualization.
Fill Between Demo Fill Between Demo Create filled regions using both the stateful API and figure_t.
Grid Demo Grid Demo Demonstrates grid functionality for enhanced plot readability.
Legend Demo Legend Demo Legends, labels, and legend placement.
Mathtext Demo Mathtext Demo Render math text and symbols in labels and titles.
Pcolormesh Demo Pcolormesh Demo Pcolormesh heatmaps with colormaps and shading.
Pie Chart Demo Pie Chart Demo Build pie charts using both the stateful API and figure_t (exploded wedges, autopct, and start angles).
Polar Demo Polar Demo Demonstrates fortplot's polar plotting API with custom colors, linestyles, and markers.
Probability Animation Demo Animate a Gaussian probability distribution as its width changes over time.
Quiver Demo Quiver Demo Quiver plots for discrete vector fields with scaled arrows and backend outputs.
Scale Examples Scale Examples Linear, log, and symlog axis scales.
Scatter Demo Scatter Demo Demonstrates enhanced scatter plotting with color mapping, variable marker sizes, and bubble charts.
Streamplot Demo Streamplot Demo Streamplots for 2D vector fields.
Styling Demo Styling Demo Line styles, markers, format strings, and scatter styling.
Subplot Demo Subplot Demo Demonstration of subplot functionality using the stateful API.
Twin Axes Demo Twin Axes Demo Demonstrates twinx and twiny for multiple axes on one figure.
Unicode Demo Unicode Demo Unicode symbols in labels and titles.