Table of Contents

Cookbook

Want to try these live? Open the Playground — pick an example, change the theme, resize the chart, and see the SVG update instantly in your browser. No install needed.

Code examples with rendered output. Every example uses the fluent Plt.Create() API and can be copy-pasted into a .NET 10 console app with dotnet add package MatPlotLibNet (and MatPlotLibNet.Skia for PNG/PDF/GIF).

Categories

Category Examples
Line Charts Line styles, markers, smooth interpolation, step functions, PropCycler, LTTB downsampling, grid/spine control, secondary Y-axis, outside legend
Bar Charts Vertical/horizontal bars, stacked, grouped, bar labels, hatching, width/alpha control
Pie & Donut Pie, donut, nested pie (sunburst), explode, shadow, percentage labels, custom colors, hatches
Distribution Histogram (density, cumulative, step, hatched, overlapping), box plot, violin, KDE, rug plot
Polar Charts Polar line, multi-series, radar, polar bar, polar scatter, polar heatmap
Heatmaps & Colormaps Heatmap, colorbar customization, 104 colormaps, color normalization, 2D histogram, pcolormesh
Contour Plots Contour lines with labels, filled contour, custom levels, contour overlay, triangulated contour
Subplots & GridSpec Grid subplots, GridSpec ratios, mosaic layout, spanning subplots, insets, shared axes, spacing
Financial Charts Candlestick + MACD + RSI dashboard, technical indicators (Bollinger, Williams %R, OBV, SAR, CCI)
Sankey Diagrams Income statement, customer journey, process distribution, vertical orientation, severity cascade
Treemaps & Hierarchical Nested pie, treemap with drilldown
3D Charts Surface, scatter, bar, Line3D, Trisurf, Contour3D, Quiver3D, Voxels, Text3D, camera, lighting, pane styling
Math Text Greek letters, fractions, square roots, accents, font variants, operator limits (∫ Σ Π), matrices
Error Bars Symmetric, asymmetric, cap size, combined scatter+error, confidence bands
Broken Axes X/Y breaks, zigzag/diagonal/none styles, combined breaks, outlier handling
Symlog Axis Symmetric log Y/X, financial P&L, scale comparison (linear vs log vs symlog)
Geographic Maps 13 projections, globe view, coastlines, borders, land/ocean fill, custom GeoJSON, edge handling
Themes 26 built-in themes, custom ThemeBuilder, PropCycler, 3D pane colors
Interactive SVG Browser pan/zoom/tooltips/legend toggle, highlight, selection, 3D rotation, SignalR
Animation FuncAnimation GIF, multi-page PDF, individual frame export, rotating 3D
Streaming & Realtime Live data append, ring buffers, streaming indicators, axis scaling, Rx integration
Annotations Text, arrows, reference lines (horizontal/vertical), shaded spans, math text in annotations
Styling & Themes 26 themes, PropCycler, grid/spine control, tight margins, tick mirroring, templates
Tick Formatting Engineering notation, date axes, custom locators, minor ticks
Accessibility Color-blind safe palette, high-contrast theme, ARIA semantics, keyboard navigation