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 (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.
Ascii Heatmap
Render a heatmap to terminal-friendly ASCII output.
Bar Chart Demo
Demonstrates grouped bar charts (vertical and horizontal) via both the stateful API and figure_t.
Basic Plots
Basic line plots and saving outputs (PNG, PDF, ASCII).
Boxplot Demo
Demonstrates box-and-whisker plots for statistical data visualization.
Contour Demo
Comprehensive contour plotting examples: line contours, filled contours, custom levels, colormaps.
Display Demo
show_viewer() opens a PDF viewer. show() uses the viewer when a GUI is available, and ASCII output otherwise.
Dpi Demo
Control output DPI when saving figures for consistent sizing across formats.
Errorbar Demo
Demonstrates error bar plotting with both symmetric and asymmetric errors for scientific data visualization.
Grid Demo
Demonstrates grid functionality for enhanced plot readability.
Pie Chart Demo
Build pie charts using both the stateful API and figure_t (exploded wedges, autopct, and start angles).
Polar Demo
Demonstrates fortplot's polar plotting API with custom colors, linestyles, and markers.
Quiver Demo
Quiver plots for discrete vector fields with scaled arrows and backend outputs.
Scatter Demo
Demonstrates enhanced scatter plotting with color mapping, variable marker sizes, and bubble charts.
Styling Demo
Line styles, markers, format strings, and scatter styling.
Subplot Demo
Demonstration of subplot functionality using the stateful API.
Twin Axes Demo
Demonstrates twinx and twiny for multiple axes on one figure.