Skip to content

Roadmap

H.P. Gansevoort edited this page Nov 27, 2026 · 79 revisions

Roadmap

In short

This page lists what MatPlotLibNet has built and what it will build, in the order the work is done. What is done comes first, and below it what is still to come.

The one rule behind the order: nothing stands above a row it needs. Among the rows that are free to move, the one a reader reaches for most often, and pays least for, comes first.

There are no dates — a row moves when it is true, and the changelog is where it says so. What is still to come is what the library itself says it does not do yet: a setting that changes nothing, a chart type that does not come back from JSON, a chart people ask for that it cannot draw yet, a suite no workflow runs. Releases follow what people need, so a Discussion or an Issue that needs a row is what moves it up.

The table gives one line per row. Every row has a section of its own below, under its own name.

What it is In one line
Done The fluent core Plt.Create(), FigureBuilder and AxesBuilder: a chart in one chain, drawn as SVG, written to JSON and read back. See Fluent Cheatsheet.
Done Themes and colour maps 30 themes, matplotlib's own looks among them, and 148 colormaps counting their reversed forms. See Styling.
Done Blazor and ASP.NET Core <MplChart> and <MplLiveChart>, a SignalR hub, REST endpoints, and clients for Angular, React and Vue. See Package Map.
Done The chart types 91 series types: lines and bars, statistical, financial, grid, 3-D, polar, hierarchical, flow and the control room's. See Chart Types.
Done PNG, PDF and GIF MatPlotLibNet.Skia: the same figure as a PNG, a PDF of one page or several, and an animated GIF. See Getting Started.
Done Technical indicators 59 indicators computed from a price series and drawn on it, from a moving average to transfer entropy. See Chart Types.
Done GraphQL MatPlotLibNet.GraphQL: charts as HotChocolate queries and subscriptions. See Package Map.
Done 3-D and polar axes Surfaces, bars and points in 3-D under a camera that turns, and charts on polar axes. See Advanced.
Done Axes, scales and ticks Linear, log, symlog, date and broken axes, limits drawn exactly as set, reversed ones too, a second axis on the right or on top, and tick locators and formatters of your own. See Styling.
Done A third and fourth Y axis, outward-stacked two to a side WithOutwardYAxis stacked a second axis past the first on either side — four scales total, two left and two right, each with its own range, ticks and series — and WithAddRightYAxis and WithAddLeftYAxis now stack as many as a chart needs. See Styling.
Done More kinds of series on a second axis A secondary axis restores through the same registry the primary one does, so any registered kind — a bar, an area — survives there too, not only lines and points. See MCP Server.
Done Zoom and pan on a second axis A wheel zoom, a drag pan, a rectangle zoom and Home move every outward-stacked axis' own range, each by its own proportional amount, whether the server answers them or a native control does. See Bidirectional SignalR and Interactive Controls.
Done Layout GridSpec, mosaic layouts, insets, and a constrained layout that makes room for titles, ticks and legends. See Advanced.
Done Notebooks Charts inline in Polyglot Notebooks and Jupyter; the package stands still at the version it reached.
Done MathText LaTeX-style math in any label: Greek letters, sub- and superscripts, fractions, roots, operator limits and matrices. See Advanced.
Done Accessibility Alt text and a description in every SVG, keyboard navigation, safe palettes, and the chart's data as a table beside it.
Done DataFrame MatPlotLibNet.DataFrame: plots and indicators straight from a Microsoft.Data.Analysis DataFrame. See Package Map.
Done Drawn as matplotlib draws matplotlib's own look by default, its font bundled, and a suite that compares the output with images matplotlib drew. See MatplotlibThemes.
Done Interaction through the server Zoom, pan, legend clicks, selection, hover and the data cursor in the browser, answered by the server over SignalR in the units of the data, on log and symlog axes too. See Bidirectional SignalR.
Done Native controls Avalonia, Uno, WPF and MAUI controls that draw natively, without a WebView; the first three pan, zoom and select in the units of the data. See Interactive Controls.
Done Streaming Live series in ring buffers, indicators that follow each new bar, and a streaming control in Blazor and on every native head.
Done Maps MatPlotLibNet.Geo: 13 map projections and Natural Earth coastlines and countries, embedded. See Chart Types.
Done The control room Plt.OpsDashboard(): KPI tiles, state timelines, a service-topology panel and one shared time window. See Chart Types.
Done The MCP server MatPlotLibNet.Mcp: an AI agent renders this library's charts from a JSON spec and reads their data back. See MCP Server.
Done Text in any script Arabic, Hebrew and every other script drawn in its own order and its own letter shapes. See International Text.
Done Charts in Verso MatPlotLibNet.Verso: a Verso notebook cell that ends on a figure shows the chart. See Verso.
Done Examples that compile The wiki's C# examples compiled against the packages on every CI run, and a page of each release's calls. See Examples.
Done Direct labels and axis colours A line's name at its end instead of in the legend, and an axis in its line's colour, on all four axes. See Examples.
Done A figure that reads back from JSON whole Every setting a figure draws, its theme, colour maps, tick locators and legend among them, comes back from JSON, the MCP server and every transport. See MCP Server.
Done A spine's line style kept in JSON A spine's line style travels with its colour and width; a spine written without one reads back solid. See Styling.
Done Missing values NaN is the one missing value: a line breaks at a gap, nothing is drawn at NaN, and ranges, colour maps and JSON leave it out or carry it. See Examples.
Done Save settings that reach the file WithDpi and SaveOptions reach the file: a PNG is drawn at the figure's dpi, and a title and an author go into the SVG, the PDF and the PNG. See Styling.
Done Charts in one call Twenty verbs, from Pareto and Ridgeline to Raincloud and Horizon, draw a chart from the data as you hold it. See Examples.
Done Every series kind and every axes setting back from JSON A Sankey's nodes and links, a treemap's, sunburst's, dendrogram's and clustermap's trees, a tree grid's rows, a polar chart's data, a streaming chart's current points and a planar 3-D bar's data all come back from JSON as themselves, not a placeholder. An axes' Z axis, its 3-D pane colours and its tooltip switch come back too. See MCP Server.
Done Series that share one colour A series' ColorGroup puts it in the same rendered colour as every other series holding the group, as long as the run is contiguous; a Kaplan-Meier curve's band and censor marks, a Raincloud's violin/box/points and a Horizon's folds all use it. See Examples.
Done Raincloud Raincloud draws a half violin, a narrow box and a group's raw, jittered points side by side, all sharing one colour, with one legend entry for the group. See Examples.
Done Horizon chart Horizon folds a signed series into bands of two hues, one for its non-negative part and one for its negative part. See Examples.
Done A container for the Y axes WithAddRightYAxis and WithAddLeftYAxis, called as often as a chart has axes, stack each axis past the one before it on its side, with no cap and no "second" or "third" in a name. The primary Y axis is the first axis of the left side, so every Y axis keeps its own range, ticks, colour, series and legend entry the same way, and a Y title stands 4 px from its tick labels on both sides, a distance a chart can set with WithYAxisTitleGap. See Examples.
Done A legend placed where it covers the least data LegendPosition.Best, the place a legend has when nobody names one, looks at the marks as drawn and stands where it covers the fewest, as matplotlib's loc='best' does; the classic theme keeps its upper right corner. See Styling.
Done Annotations in the theme's text size An annotation takes the theme's text size, can be moved a number of pixels from its point with OffsetX and OffsetY, and can be centred on it vertically with VerticalAlignment. See Examples.
Done Turned tick labels given room sideways A turned X tick label gets room beside the plot as well as below it, and a Y tick label is measured at its own rotation, so a crowded axis no longer runs past the edge of the figure. See Styling.
Done A bar's value label stands beyond the bar's end With ShowLabels a bar's value stands beyond its end in the direction the bar points in the data, vertical or horizontal, on an axis that runs forwards or backwards. See Examples.
Done Annotations that move out of the way An annotation with AvoidOverlap moves its text clear of the data, the legend and the other annotations, and draws a thin line back to its point. See Examples.
Done Colour bar ticks at round numbers A colour bar asks a tick locator for as many ticks as fit along its length, so a range of 0 to 11 reads 0, 2, 4, 6, 8 and 10. See Examples.
Done A filled line contour that follows the axes' range A filled contour fills the bands between its levels over the grid, and follows a limit or a zoom. See Chart Types.
Done A density curve inside its own range A Kde curve and its axes share one extent, three bandwidths past the sample, so the curve ends inside the plot. See Chart Types.
Done A map's polygons back from JSON A map keeps its projection and its features in the JSON and comes back whole, its holes included. See Chart Types.
Done Series that refuse input that does not fit when they are built A series whose arrays do not pair is refused when it is built or read, in one wording, and never when the chart is drawn. See MCP Server.
Done Series that draw without the axes around them A series says for itself that it needs no axes, so a KPI tile in a mosaic built by hand draws no ticks and no frame. See Examples.
Done A legend entry that fits a state timeline A state timeline's legend entry wears a stripe for each state the timeline draws. See Examples.
Done Stacked-area layers in the legend and through MCP A StackPlot lists its named layers in the legend, holds a colour for each, and the MCP server accepts it. See Examples.
Done One radial scale for polar charts The rings, lines, points, bars and heatmap of a polar axes read one scale, with rings at round numbers labelled at 22.5°. See Examples.
Done Stacked polar bars The polar bar series of an axes stand on one another when the bar mode is stacked, so a wind rose is one PolarBar call for each speed class. See Examples.
Done Bars stacked on both sides of zero Layers at or above zero grow up from zero and layers below it grow down, so a Likert scale is a stacked bar chart. See Examples.
Done Map regions coloured by value Choropleth colours each country by a value through a colour map, with a colour bar. See Chart Types.
Done Bubble, flow and cartogram maps Points, Bubbles, HexBins, Flows, Cartogram, ContiguousCartogram and Dorling put data on a projection, and H3Cells and H3Bins draw the cells of the H3 index. See Chart Types.
Done A PNG saved without the Skia package Without MatPlotLibNet.Skia, Save("chart.png") and Save("chart.pdf") are refused and name the package, instead of writing SVG text under a raster name. See Getting Started.
Done An inset built with the builder that keeps its axes settings AddInset configures the inset where it stands, so its legend, tick locators and formatters, scales, overlays and colour bar are the ones you set. See Advanced.
Done A grid changed with WithGrid that follows the theme after JSON WithGrid is kept as a change over the theme's grid, so a theme set later or after JSON is read restyles the rest of the grid and keeps the change. See Styling.
Done A neutral colour the theme owns Reference lines, levels, trendlines and the connectors of the composed charts wear a grey that each theme holds and that reaches 3 : 1 against its plot. See Styling.
Done A colour bar that follows the normaliser A colour bar puts its ticks where the series' normaliser puts their colours, and a banded normaliser has them on its band boundaries. See Examples.
Done Light with a strength of its own The ambient and diffuse arguments of WithLighting set how strongly a surface or a 3-D bar is lit. See Advanced.
Done A relative rotation graph that always shows its centre The range of a relative rotation graph holds 100/100, so the four quadrants and the crosshair stay in view. See RelativeRotationSeries.
Done A Marimekko chart's table that names its columns The table has a row for each column with its name, its two edges and the height of each segment's cell. See Accessibility.
Done A calendar heatmap's table that gives each day's date The table has a date for every cell, kept as the date of the first cell. See Accessibility.
Done Violin density from a kernel estimate A violin's outline is the sample's Gaussian kernel density, the estimator the density plot and the ridgeline use. See Chart Types.
Done A Q-Q plot against other distributions ProbabilityPlot compares a sample with an exponential, uniform, log-normal or Student t distribution, or one of your own. See Examples.
Done A survival chart's risk table and log-rank test RiskTable writes the number at risk under the curve and the log-rank test between the groups. See Examples.
Done More control charts ShewhartChart draws the moving-range, X-bar, R, p and c charts and marks the points Nelson's eight tests flag. See Examples.
Done Anchored VWAP Vwap(bars, anchor) counts the volume-weighted price from a bar you pick; the streaming form restarts with AnchorHere(). See Chart Types.
Done Volume profile VolumeProfile draws the volume traded at each price as bars beside the price chart. See Chart Types.
Done A waffle chart Waffle fills a grid of equal squares in proportion to each category's share, so "37 of every 100" is thirty-seven squares you can count. See Examples.
Done Calendar of events CalendarEvents puts a mark for each event inside the cell of its day, side by side when a day has several, one colour for each kind. See Examples.
Done Point and Figure PointAndFigure draws columns of Xs and Os for a price series, close only, as a series that comes back from JSON. See Examples.
Done Renko Renko draws bricks of a fixed price step, in the new family of price verbs, and comes back from JSON as its parts. See Examples.
Done Kagi Kagi draws one line that thickens and thins where the price breaks the last shoulder or the last waist. See Examples.
Done Gradient fills A bar or an area fades from its colour to another with GradientColor, drawn alike in SVG, PNG and PDF. See Examples.
Done Arrows along a connected scatter ConnectedScatter draws the path two values take, with an arrow from each point to the next. See Examples.
Done Range frames A spine takes BoundsFrom and BoundsTo, so an axis line spans only the data's range, and its ticks stand on it. See Styling.
Done Two plots matplotlib has FillBetweenX and MatShow, and an aspect setting that keeps a plot's scale equal. See Examples.
Done Parallel coordinates in each axis's own units Each column's line carries ticks over its own range, so a value can be read, not only compared. See Examples.
Done Icicle chart Icicle draws a hierarchy in rows by depth, each node as wide as its share of its parent. See Chart Types.
Done Arc diagram GraphLayout.Arc lays a graph's nodes in a row and joins them by arcs above it. See Examples.
Done Stem-and-leaf plot StemAndLeaf writes a sample as stems and leaves, a column for each leaf, so they line up in any font. See Examples.
Done A waterfall's target WaterfallSeries.Targets marks the level each step was meant to reach. See Examples.
Done The matplotlib comparison run by CI The suite that compares the output with images matplotlib drew runs in CI and in the release job, on a colour distance that reads every pixel. See MatplotlibThemes.
Done Word cloud WordCloud sets each word in a size that follows the square root of its weight and packs the words on a spiral without overlap; nothing is dropped silently. See Examples.
Done Chord diagram Chord draws the flows between groups as a ring of arcs with a ribbon for each flow, ordered so that a complete graph crosses least. See Examples.
Done Ternary plot TernaryScatter and TernaryPlot place three parts that make a whole in a triangle, with a grid at every fifth and the parts named at the corners. See Examples.
Done Piper diagram Piper draws the major ions of a set of waters on two triangles and a diamond, from the mg/L a laboratory delivers. See Examples.
Done Linked selection A brush on one chart lights the rows it covers on the other charts of its group; a series names its rows with RowKeys. See Examples.
Done Step-through SVG AnimationBuilder.SaveStepThroughSvg writes an animation as one SVG with a slider, a play button and the arrow keys, and no server. See Examples.
Done A live chart that sends its own gestures MplLiveChart hands the script in its SVG the SignalR connection it holds, so zoom, pan, legend and Home reach the server without JavaScript of your own. See Bidirectional SignalR.
Done Home that returns to the first view in the native controls The figure remembers each axes' view from before an interaction first moved it, and Home, Escape and a double-click go back to it, in the browser script and in the native controls alike. See Interactive Controls.
Done The MAUI view on a par with the others A finger pans, zooms, brushes and picks points on a MAUI chart through the host the other heads share, and the canvas draws hatches, gradients and the arcs of a pie. See Interactive Controls.
Done Streaming forms of more indicators 57 of the 59 indicators have a streaming form that follows each new bar, attached to a candle series with WithStreaming. See Streaming.
Done Transfer entropy over time TransferEntropyOptions chooses the Kraskov estimate, a rolling window and a series to condition on; the entropy is one value for each bar. See Examples.
Done A handler of your own for a chart's gestures IChartEventHandler receives every interaction event once, with the viewer it came from, on a server and on a native control. See Interactive Controls.
Done Several viewers as a designed feature Every event is stamped with its viewer, a page can show each viewer's pointer with a name, and everyone is told who moved the shared view. See Bidirectional SignalR.
Done The Windows heads tested by CI A windows-heads job builds the MAUI, WPF and Uno packages on every push and runs their suites. See Package Map.
Done Stairs Stairs draws a value for each bin held level between its edges, as an outline or filled down to a baseline, in one series with one legend entry; a missing value is a gap, never a zero. See Examples.
Done Line segments between two limits VLines and HLines draw many vertical or horizontal segments, each from one value to another, as one line with one legend entry; a limit given once serves them all. See Examples.
Done Contour labels that follow the line A contour label stands at the middle of its line, turned along it and kept upright, in the colour of the line on a patch the colour of the theme's background. See Examples.
Done Power spectrum, cross spectrum and coherence Psd, Csd and Cohere draw Welch's average of windowed segments, with the window, detrend, overlap, scaling and sides that SpectralOptions names and matplotlib's defaults for what it leaves out. See Examples.
Done Auto- and cross-correlation Acorr and Xcorr draw a signal's correlation with itself or with another at every lag, as stems with a line at zero or as markers. See Examples.
Done Magnitude, phase and angle spectrum MagnitudeSpectrum, PhaseSpectrum and AngleSpectrum read one transform of a signal as its size, its unwrapped phase or its wrapped angle. See Examples.
Done The mesh of a triangulation Triplot draws the edges of a triangulation as one line, each shared edge once, from the triangles you give or the ones Tripcolor uses. See Examples.
Done Text, legend and image on the figure FigText, FigLegend and FigImage place text, a legend of every subplot's series and an image in the figure's own coordinates, in every output. See Examples.
Done The zoom of an inset IndicateZoom on an inset has the parent draw a rectangle around the area the inset shows, joined to the inset by two lines. See Examples.
Done Rectangles, polygons and arrows Rectangle, Polygon and Arrow (matplotlib's FancyArrow) are shapes in data coordinates, added with AddPatch, drawn through the axes' transform, held in the range and the legend, and read back from JSON and the MCP server. See Examples.
Done Circles, ellipses, wedges and arcs Circle, Ellipse, Wedge and Arc are matplotlib's Bézier curves in data units, so on a log axis a circle bends while a straight edge stays straight. See Examples.
Done A second axis in other units Link turns the top X axis, a Y axis past the primary or an X axis below the plot (WithAddBottomXAxis) into matplotlib's secondary_xaxis or secondary_yaxis: the primary's range shown through an AxisTransform, each tick where the primary has the value it maps back to. See Examples.

What is done

The fluent core

Plt.Create() returns a FigureBuilder; AddSubPlot hands you an AxesBuilder for each plot. Figure-level settings — title, theme, size, layout, saving — live on the first; axis labels, legends, ticks and most series live on the second. A figure is drawn as SVG, which is the library's native output, and written to JSON and read back, which is how every host below ships a chart. Everything else is written in terms of these. See Fluent Cheatsheet and Getting Started.

Themes and colour maps

Thirty themes, among them matplotlib's classic and current looks, a high-contrast theme and four operator themes for control rooms, and a builder for a theme of your own. 148 colormaps — the matplotlib and Seaborn sets, the diverging, cyclic and qualitative families, the colour-blind-safe Petroff sequences — each with its reversed form, and gradients of your own. See Styling and MatplotlibThemes.

Blazor and ASP.NET Core

MatPlotLibNet.Blazor draws a figure with <MplChart> and follows a live one with <MplLiveChart>; MatPlotLibNet.AspNetCore serves charts over REST and pushes them over a SignalR hub, registered through dependency injection. The npm packages for Angular, React and Vue are clients of the same hub and the same chart definitions. See Package Map.

The chart types

91 series types, each drawing and serialising itself: lines, scatters, bars and areas; histograms, boxes, violins and the other statistical charts; candlesticks, OHLC bars and the trading panels; heatmaps, contours and the other grids; surfaces and bars in 3-D; polar charts; treemaps, sunbursts and Sankey diagrams; network graphs, relative rotation graphs, and the control room's tiles and timelines. A contract test reads the assembly and holds the count. The charts built in one call, further down, are made of these series and do not add to the count. See Chart Types.

PNG, PDF and GIF

SVG is the core's output and needs nothing else. MatPlotLibNet.Skia draws the same figure through SkiaSharp as a PNG, a PDF of one page or of several figures as pages, and an animated GIF from a sequence of frames. See Getting Started and Advanced.

Technical indicators

59 indicators computed from a price series and drawn on its axes, from moving averages, Bollinger bands and the RSI to volatility estimators, Ehlers' filters and Schreiber's transfer entropy, and 57 of them have a streaming form. A contract test counts them by reflection, so the number cannot drift from the assembly. See Chart Types and Streaming.

GraphQL

MatPlotLibNet.GraphQL serves charts through HotChocolate: a query returns a chart, a subscription follows one as it changes. See Package Map.

3-D and polar axes

Surfaces, wireframes, bars, points, lines and text in 3-D, under a camera with an elevation, an azimuth and an optional perspective, turned by dragging in the browser and in the native controls; the panes, edges and ticks follow the camera. Polar axes carry lines, points, bars (stacked too) and heatmaps on one radial scale. See Advanced and Chart Types.

Axes, scales and ticks

Linear, log, symlog and date scales, a broken axis that leaves out a stretch of its range, a second axis on the right or on top, and the tick locators and formatters that decide where the marks go and what they say. A limit you set is the range drawn, as in matplotlib, and the plot area clips what lies outside it; a reversed limit draws the axis upside down with all of its ticks. See Styling and Advanced.

A third and fourth Y axis, outward-stacked two to a side

WithOutwardYAxis stacked one more Y axis past the one before it on either side — four scales total, two on the left (the primary axis and one past it) and two on the right, each with its own range, ticks, series and legend entries, the way matplotlib moves a twin's spine outward (ax.spines['right'].set_position(('outward', N))). Four was also the limit. WithAddRightYAxis and WithAddLeftYAxis now stack as many axes as a chart needs, and replace WithOutwardYAxis (removed in 1.30.0, see Migrating to 1.30.0); the section A container for the Y axes, further down, says how. See Styling.

More kinds of series on a second axis

A secondary axis — the right-hand one or an outward-stacked one beyond it — restores through the same registry the primary axis does, so any registered kind survives there, a bar or an area included, not only lines and points. See MCP Server.

Zoom and pan on a second axis

A wheel zoom, a drag pan, a rectangle zoom and Home move every outward-stacked axis' own range, each by its own proportional amount rather than a copy of the main axes' — whether the server answers the gesture or a native control does. See Bidirectional SignalR and Interactive Controls.

Layout

GridSpec for plots of unequal size, Plt.Mosaic for a layout drawn as letters, insets inside a plot, and a constrained layout that measures titles, tick labels and legends and makes room for them. See Advanced.

Notebooks

MatPlotLibNet.Notebooks draws a figure inline in Polyglot Notebooks and Jupyter. It stands still at the version it reached, because the runtime under Polyglot Notebooks has ended; notebook work belongs to Verso, below. See Notebooks.

MathText

LaTeX-style math between dollar signs in any title, label or annotation: Greek letters, sub- and superscripts, fractions, roots, operator limits and matrices, parsed by the library itself. See Advanced.

Accessibility

Every SVG carries its alt text and description and the roles a screen reader reads; the browser charts answer the keyboard; there are colour-blind-safe palettes and a high-contrast theme. The chart's data comes as a table beside it — figure.ToDataTables(), written as HTML, Markdown or CSV — because a sentence of alt text cannot carry a chart's data. See Accessibility.

DataFrame

MatPlotLibNet.DataFrame plots straight from a Microsoft.Data.Analysis DataFrame and runs the indicators over its columns. See Package Map and Getting Started.

Drawn as matplotlib draws

matplotlib's current look is the default, with the DejaVu Sans font matplotlib ships bundled in MatPlotLibNet.Skia, so a chart does not fall back to a system font. A separate suite compares the output with reference images that matplotlib drew; it is run by hand, and below, under what is still to come, is the row that would have CI run it. See MatplotlibThemes.

Interaction through the server

A chart in the browser sends its gestures — zoom, pan, reset, a legend click, a brush selection, hover and the data cursor — to the server over SignalR. The server applies what changes the figure and answers what only asks, such as a tooltip or the value under the pointer, in the units the reader sees. Each axes writes the area it plots in and the range it drew, so the page converts the pointer with the axes under it, on log and symlog axes too, and two charts on one page each send their own gestures. See Bidirectional SignalR.

Native controls

MatPlotLibNet.Avalonia, MatPlotLibNet.Uno and MatPlotLibNet.Wpf draw through SkiaSharp, MatPlotLibNet.Maui through Microsoft.Maui.Graphics, all without a browser or a WebView. In the three SkiaSharp controls pan, zoom, rotation, selection, the legend, the data cursor and the drawing tools are interaction modifiers they share, and a click on a point tells your application which point it was. They convert the pointer with the range and scale the renderer drew, so every gesture works in the units of the data, on log and symlog axes too. See Interactive Controls and Keyboard Shortcuts.

Streaming

Live series kept in ring buffers, so appending a point costs the same at the millionth point as at the first; redraws held to an interval you choose; an SVG diff that sends only what changed; and 57 of the 59 indicators, which follow each new bar. Blazor and every native head have a control that follows a streaming figure. See Streaming.

Maps

MatPlotLibNet.Geo brings 13 map projections, polygons for choropleths and filled land or sea, and Natural Earth's coastlines and countries embedded in the package, so a map needs no download. A map axes has one projection that every layer reads, a map comes back whole from JSON, and points, bubbles, hexagon bins, flows, a cartogram and a Dorling map put data on it. See Chart Types.

The control room

Plt.OpsDashboard() composes one screen for an operations room: KPI tiles, state timelines, a service-topology panel and a trend panel, all pinned to one time window. A timeline segment answers hover and click, so a replay can seek to the event the reader chose. See Chart Types.

The MCP server

MatPlotLibNet.Mcp is a .NET tool an MCP host starts over stdio. An agent renders a chart from the library's own figure JSON and looks at the result, saves it as PNG, SVG or PDF, asks which chart types there are and what the spec looks like, and reads a chart's data back as a table. A spec with a mistake is refused by field and path. See MCP Server.

Text in any script

The Unicode Bidirectional Algorithm runs in the core, so right-to-left text and the numbers and Latin words inside it come out in the right order. With MatPlotLibNet.Skia the letters are shaped by HarfBuzz, so Arabic joins; a font of your own registers in one call. See International Text.

Charts in Verso

MatPlotLibNet.Verso is an extension for Verso, the open-source notebook that replaces Polyglot Notebooks: a cell that ends on a figure, or on the builder that makes one, shows the chart. See Verso.

Examples that compile

A test suite of its own reads every C# block of the wiki and compiles it against the packages as built, on every CI run; a block that needs a Windows head is marked and counted instead. The Examples page shows each release's new calls in code, with the pictures they draw.

Direct labels and axis colours

WithDirectLabel() writes a line's name at its end, in its own colour, instead of in the legend, without labels overlapping. SetYAxisColor and SetXAxisColor colour an axis — spine, ticks, labels and title — to match its line, on all four axes, and both survive JSON. See Examples.

A figure that reads back from JSON whole

ToJson and FromJson, the MCP server and every transport carry every setting a figure draws, so a figure read back draws the picture it drew: the settings of every series (a test sets every settable property of every series type and reads it back; the four live series and the planar 3-D bar are named with their reason), the axes, legend, colour bar, grid, spines and overlays, the tick locators and formatters the library ships, the theme (one made with ThemeBuilder too), a colour map built in code, a colour's transparency, and NaN. A setting at its default is not written, so a figure that sets none of them writes the bytes it wrote before, and JSON from an earlier release reads back at the defaults. A locator, formatter, normaliser or colour map of a type you write yourself is code, and is left out. See MCP Server.

A spine's line style kept in JSON

A spine's JSON carries its line style beside its colour and width, so a dashed spine comes back dashed, and a spine written without one, as older JSON is, reads back solid. It came with the rest of the JSON work in the row above. See Styling.

Missing values

NaN is the one missing value. A line, a step line and a filled area break at it, as in matplotlib, where the line used to run straight across the gap; an infinity breaks them too, and a value a log axis cannot place takes them down to the edge of the plot, as matplotlib's log scale clips it. A mark that cannot be placed is left out, never drawn at NaN. Axis ranges, colour ranges, density estimates and fits use the values that are there; a colour map draws a missing value in its bad colour; JSON writes it as "NaN" and reads it back. See Examples.

Save settings that reach the file

A figure is laid out in pixels at 96 dpi. A PNG, and each frame of a GIF, is drawn with dpi / 96 pixels for each, at the figure's WithDpi or at SaveOptions.Dpi for one save, so 500 × 350 at 192 dpi is a 1000 × 700 PNG with the same layout. SaveOptions also indents an SVG, rounds its positions to the decimals you give, and writes a title and an author into the SVG, the PDF and the PNG. An SVG, a PDF page and JSON have no pixels, so the resolution changes nothing there. See Styling.

Charts in one call

Twenty verbs on the axes builder draw a chart from the data as you hold it: Lollipop, Dumbbell, Pareto, SlopeGraph, DotPlot, ParallelCoordinates and Marimekko from values keyed by names; Ridgeline, QQPlot, ProbabilityPlot, KaplanMeier, RiskTable and Raincloud from samples; BumpChart, ControlChart, ShewhartChart, StreamGraph and Horizon from values over x; CalendarHeatmap and Spy, matplotlib's spy plot, from the cells of a grid. Each builds its chart from series the library already has, one series for each thing it draws, so the count of series types stays 83, and written to JSON a composed chart is its parts. See Examples and Chart Types.

Every series kind and every axes setting back from JSON

Polar lines, polar points, polar bars, Sankey diagrams, sunbursts, treemaps, dendrograms and tree grids used to write their settings to JSON but not their data, and come back as a fixed placeholder — one bar, one point, a single node — instead of the data in the document; the MCP server refused all of them for that reason. A clustermap's row and column trees were not written either, and a planar 3-D bar was written and never read back. Each now carries its data in its own shape — a Sankey's nodes and links, a tree's recursive structure shared by the treemap, sunburst, dendrogram and clustermap, a tree grid's flat rows, a streaming series' current ring-buffer snapshot — and round-trips under test.

A streaming line and a streaming scatter used to share one type name in the wire format, so the registry could restore only one of the two; a streaming candlestick and a streaming signal had no registered factory at all. Each streaming kind now writes and reads its own name, carrying its capacity and its current points, bars or samples so a restored stream starts from the picture it was, not empty.

The JSON of an axes used to carry its camera and a directional light, but not its Z axis, its 3-D panes or its tooltip switch. A 3-D surface with SetZLabel("Altitude") and SetZLim(0, 10) now comes back with both. See MCP Server.

Series that share one colour

A verb that draws several series as one group — a Kaplan-Meier curve alongside its confidence band and censor marks, or a raincloud's violin, box and points — puts its members in one fresh colour group (Axes.InColorGroup(members), the number derived fresh each time from the highest group already held, never stored) and adds them back to back. SeriesSlotExtensions.ColorSlots folds a contiguous run of one group into one rendered colour slot, which every renderer and the legend's swatch read; a series with no group still takes the theme's next colour exactly as before, and a series' own position in the legend's hit-test order is unaffected by the group it shares.

Raincloud

Raincloud draws a half violin, a narrow box and every group's raw, jittered points side by side at the group's own index, all three sharing one colour group. Only the violin carries a label, so one legend entry names the trio rather than a swatch per group falsely standing for several differently coloured groups; the groups themselves are named along the X axis. See Examples.

Horizon chart

Horizon folds a signed series into a stack of bands, each at a fraction of the series' own peak and a deeper shade of its band's colour group. The non-negative and the negative parts of the series fold into two separate colour groups, so a signed series reads as two hues instead of one. See Examples.

A container for the Y axes

Every Y axis of a chart belongs to one container. The primary axis is the first axis of the left side, and each further axis stacks outward past the one before it, on either side. WithAddRightYAxis and WithAddLeftYAxis add one axis per call, as often as the chart has axes: there is no cap, no "second" or "third" in a name, and nothing for the caller to count. On the left, the first axis added stands next to the primary one, which stays the axis nearest the plot. It is matplotlib's repeated twinx() with the spine moved outward, in one verb. One builder has the same verbs for every axis added: a label, limits, Plot, Scatter, StreamingPlot, WithDirectLabel and a colour. SetYAxisColor colours an axis' ticks, tick labels and title on any axis, the primary one included, and the spine too on the first axis of a side; an axis stacked past it draws no spine of its own.

Every Y axis draws the way the primary one does, with its own log or symlog scale, tick locator, minor ticks and a title in math markup, and a line on a left-hand axis can carry its name at its end. The layout reserves exactly the room the axes draw, so a left-hand title is no longer cut off at the edge of the figure. A Y title stands 4 px from its tick labels on the left and on the right alike, matplotlib's axes.labelpad, and WithYAxisTitleGap sets another distance for the whole chart; a title's own Pad adds on top. A browser draws the same SVG with the metrics of its own font, so what it shows can differ from side to side by up to about 2 px. The JSON keeps every axis, whatever their number, and a figure within the four axes 1.23.0 allowed writes the file that release wrote.

WithSecondaryYAxis, WithOutwardYAxis and the accessors and types that went with them, Axes.SecondaryYAxis, Axes.RightYAxes and Axes.LeftYAxes among them, were obsolete from 1.24.0 and are removed in 1.30.0; Migrating to 1.30.0 names what replaces each. Around the container, the MCP server checks every axis of a chart spec and names the place it refuses, and a live chart session no longer ends for good on one event it cannot apply. See Examples and Fluent Cheatsheet.

A legend placed where it covers the least data

LegendPosition.Best, the position a legend has when nobody names one, looks at the marks as the chart draws them and stands in the one of ten places that covers the fewest, as matplotlib's loc='best' does. The places are tried in matplotlib's order: upper right, upper left, lower left, lower right, right, centre left, centre right, lower centre, upper centre and centre. A place is scored by what would stand under the legend's box: the vertices of a line that lie inside it, the centres of points inside it, each bar or other box that overlaps it, and each path with a segment that crosses it. The first place with the lowest score wins, and the search stops at one that covers nothing.

Everything the chart draws counts, a hidden series too, as in matplotlib, and so do the texts of annotations at their points. It works on Cartesian, polar and 3-D axes; the legend of a map stands in the upper right corner. A position you name is always kept, and the classic theme keeps matplotlib's classic default, the upper right corner. See Styling.

Annotations in the theme's text size

An annotation's text takes the theme's text size, as tick labels and the names at the ends of lines do; its Font still overrides it. OffsetX and OffsetY move it a number of screen pixels from its point (OffsetY counts downward), and VerticalAlignment (Baseline, Center, Top or Bottom) says which part of the text stands on the point; the default is the baseline, as before. The labels of a radar chart, the percentages of a pie, the node names of a network graph, a funnel's labels and a bar's value labels take the theme's text size in the same way. A slope graph's start names are centred on their markers, at the size of its end names. See Examples.

Turned tick labels given room sideways

The layout measures an X tick label at the rotation it is drawn at, below the axis and beside the plot. The first label of a bottom axis, turned and hung from its end, can stand out to the left of its plot and the last to the right of it, and the margin, or the gutter between two plots, grows by that and the pad. A Y tick label is measured at its own rotation. Whether a label turns depends on the width of the plot, and the width of the plot on the margins, so the layout settles the sides in up to four passes, and stops when a pass moves them by less than 0.01 px. A figure whose labels do not stand out sideways is laid out as before. See Styling.

A bar's value label stands beyond the bar's end

With ShowLabels set, a bar's value stands beyond the bar's end in the direction the bar points in the data: above the end of a bar that rises and below the end of a bar that falls on a vertical bar, to the right of it or to the left of it on a horizontal one. It does so on an axis that runs forwards and on one that runs backwards, so a bar below zero has its label under its end, as matplotlib's bar_label puts it. The gap to the end is 4 px. See Examples.

Annotations that move out of the way

An annotation with AvoidOverlap set moves its text clear of what it would cover: the marks the chart drew, the legend's box, the annotations that stay put and the ones already moved. It tries the text where it was anchored, then in eight directions at one, two, three and four text heights from there, stays inside the plot, and takes the first place that covers the least. When it moved more than 6 px it draws a thin line back to its point, unless it has an arrow of its own. An annotation that does not set AvoidOverlap stays where it is anchored, as before. See Examples.

Colour bar ticks at round numbers

A colour bar asks a tick locator for its ticks, as an axis does, and takes as many as fit along its length: a vertical bar one for every two lines of the tick font, a horizontal bar one for every three, never fewer than 2 or more than 9. The calendar heatmap sample colours days from 0 to 11, and its bar reads 0, 2, 4, 6, 8 and 10, where it read 0.0, 2.2, 4.4, 6.6, 8.8 and 11.0. All the labels share one number format, a tick stands where its value is on the gradient, the bar of a figure reads the same ticks as the bar of an axes, and the layout reserves room for the widest label the bar can carry. A short bar is not crowded. In 1.30.0 a bar given a locator of its own (ColorBar.Locator) names that locator's ticks instead. Every picture with a colour bar changes. See Examples.

A filled line contour that follows the axes' range

ContourSeries with Filled set and Contourf fill the bands between the levels by one rule: from the lowest value to the highest, over the points of the grid, with the lines as their edges. The fill stands where the grid stands and follows the axes' range and the limits you set: under SetXLim(1, 3) the fill of a 5 × 4 grid used to span the plot while its lines moved, and it now stops where the grid does. A cell with a value that cannot be drawn is left empty. The lowest band of a Contourf used to cover the whole plot rectangle as well, so the picture of every filled contour changes. See Chart Types.

A density curve inside its own range

A Kde curve is drawn over the sample from three bandwidths below the smallest value to three above the largest, and its axes take that same extent, so one rule decides it and the tails fall to zero inside the plot. The density of 1, 2, 3, 4, 5, 6 and 30 in a figure of 500 by 350 pixels used to run 82.66 px beyond the plot on each side, into the margins and past the edge of the figure. A bandwidth that is not a positive finite number is not used; Silverman's is. The axes of every Kde picture change. See Chart Types.

A map's polygons back from JSON

A map (GeoPolygonSeries) writes its projection, with the numbers it was made with by their PROJ names (lon_0, lat_0, lat_1, lat_2), and its features, as the id of a built-in Natural Earth set or as a GeoJSON FeatureCollection with the holes kept, into the series' package data, and the package registers the reader that rebuilds it. A figure with a map comes back from JSON as the picture it was. A process that reads JSON before it has used any type of the package calls GeoPolygonSeries.RegisterReader() once. A 1.23.0 reader drops the map with the diagnostic for a series kind it does not know, and the rest of the figure is intact. The MCP server lists maps too, as geo_polygon. See Chart Types and MCP Server.

Series that refuse input that does not fit when they are built

A series that cannot be drawn from the data it was given is refused when it is built, with an ArgumentException in the library's wording ("Array lengths must match. Got 3 and 2."; for a grid, which needs one row for each y value and one column for each x value, the sizes it has and the sizes the axes give). That covers the 3-D series, wind barbs, the polar series, a pseudocolour mesh (one edge more than it has cells), triangle contours and colours, a Sankey link that names a node that does not exist, a stream plot, a surface, a wireframe, a stack plot whose layer is shorter or longer than its x values, and a 2-D histogram of fewer than one bin along an axis. A figure read from JSON builds each series through the same verb, so a document whose arrays do not pair is refused when it is read. A probe that damages every array of every shipped series (one place short, empty, absent, ragged or turned) and reads the JSON back found 88 figures that were read and then threw while they were drawn; the same probe finds none now. The MCP server asks the library whether a series fits and names the place where it stands, for example $.subPlots[0].series[1], and carries no rule of its own. A regression or a residual plot keeps its tolerance: what does not pair is skipped and reported through the chart diagnostics. See MCP Server.

Series that draw without the axes around them

A series says for itself whether it needs the axes around it. A stat tile, a donut, a funnel, a gauge, a progress bar, a bullet graph, a sparkline, a Sankey, a clustermap and a pair grid draw no grid, ticks or frame, as a radar, a pie, a treemap, a table and a tree grid already did, so a KPI tile in a mosaic built by hand needs no HideAllAxes() (it still works). The axes asks each series; it keeps no list of types. A test holds each answer to a measurement: a series that says so draws the same marks under any limits. See Examples.

A legend entry that fits a state timeline

The legend entry of a state timeline is one entry, under the series' name, with a stripe for every distinct state in the order the states first appear, each in the fill the timeline draws that state with: its colour, and the hatch an explicit pattern or a stated condition gives it. On the ops dashboard sample the swatch was a blue square beside green, orange and red segments; it now shows the fills of the states. See Examples.

Stacked-area layers in the legend and through MCP

A StackPlot with Labels lists each named layer in the legend, in the colour that layer is drawn in, and a click on any of them hides or shows the whole stack. The series holds one slot of the colour cycle for each layer, so a line added after a stack of three layers wears the fourth colour, as in matplotlib, and no longer a colour a layer already wears; a pie, a donut and a funnel take one slot for each part in the same way. A stack with no layer names keeps one entry under the series' name. The MCP server accepts a stacked-area spec (x values and layers, no y values). See Examples.

One radial scale for polar charts

A polar axes has one radial scale that its grid and every polar series read: lines, points, bars and heatmaps. The rings stand at round numbers (a tick locator over the radius, sized to the radius in pixels), are labelled in one number format, or by the axis' own formatter, at 22.5° so the labels stay clear of the bars of a wind rose, and a ring labelled 10 stands exactly where a radius of 10 is drawn, whichever kind of series draws it. The scale reaches 5 % beyond the farthest radius, or exactly the limit you gave the axes; a radius that is not a number is left out, and so was one below zero until 1.30.0, which draws it on a scale that reaches it (and ranges the scale as matplotlib does under its themes). On the wind rose sample, whose largest bar is 14.1, the rings read 3.102, 6.204, 9.306, 12.408 and 15.510 side by side on the 0° spoke; they now read round numbers. Every polar picture changes. See Examples.

Stacked polar bars

When the bar mode of a polar axes is stacked (SetBarMode(BarMode.Stacked)), its PolarBar series stand on one another, wedge by wedge: each starts where the sum of the series before it ends, aligned by index, and the rings reach the top of the stack. A wind rose with its speed classes stacked outward from the centre is one PolarBar call for each class. A radius that is not drawn adds nothing, and one bar series alone is not a stack. The stacking is worked out when the chart is drawn and written into no series, so the JSON is unchanged. See Examples.

Bars stacked on both sides of zero

A stacked bar chart keeps two running sums. A value at or above zero grows up from the sum of the layers at or above zero before it, and a value below zero grows down from the sum of the layers below zero, so a diverging stacked bar (a Likert chart, the answers that disagree below the middle line and the answers that agree above it) is a stacked bar chart. A zero goes with the positives, and a value that is not a number adds to neither sum. The range of the axes takes in every foot and end. See Examples.

Map regions coloured by value

Choropleth colours each country by a value through a colour map, and WithColorBar() reads the range of the values that can be drawn. The values are joined to the built-in countries by their three-letter code (ADM0_A3: FRA, NOR, ...), or a numeric property of the features (POP_EST, GDP_MD) is read, parsed invariantly; a country with no value is drawn in the colour map's bad colour. GeoPolygonSeries takes Values (one for each feature), a ColorMap and a Normalizer, and all three travel in the JSON. A map's ocean or land, which is a plain fill, backs no colour bar. H3Cells colours the cells of Uber's H3 index by a value, named by their index, and H3Bins counts places into the cells of one resolution, through a managed port of the H3 library that the Geo package brings with it; a cell that crosses the antimeridian is cut there, and one that goes round a pole is closed along it. See Chart Types.

Bubble, flow and cartogram maps

Points and Bubbles mark places by latitude and longitude (a bubble's area is in proportion to its value, the largest 400 square points, as a scatter's size is), HexBins bins places into hexagons in the plane of the map, Flows draws a line along the great circle for each GeoFlow as wide as its quantity and cut where it crosses the antimeridian, Cartogram resizes each country so that its area is in proportion to its value without moving its centre, and Dorling puts a bubble at the centre of each country. A place the projection cannot place, such as the far side of an orthographic globe, is left out, and a call that is refused leaves the axes as it was. Cartogram keeps each country's shape and place; ContiguousCartogram bends the countries so that they still meet at their borders, by the fast flow-based method of Gastner, Seguy and More. See Chart Types.

A PNG saved without the Skia package

The core draws SVG and JSON and nothing else, and Save picks the export by the file's extension. With MatPlotLibNet.Skia loaded, the PNG and PDF exports register themselves. Without it, Save("chart.png") and Save("chart.pdf") throw an InvalidOperationException that names the package, and Save("chart.gif") throws one that sends you to an animation's SaveGif. The file is never opened, so a file that was there stays, and no SVG text is written under a raster name. Any other extension still writes SVG, and an export you register yourself for an extension replaces the refusal. See Getting Started.

An inset built with the builder that keeps its axes settings

The axes builder's AddInset hands its callback a builder over the inset itself, so the inset is configured where it stands and nothing is copied across from another axes. Its legend, tick locators and formatters (an ITickFormatter of your own among them), scales, overlays and colour bar are the ones you set, and a chart drawn in an inset by one of the one-call verbs keeps the names it writes on its axes, as an inset read from JSON always did. The inset's grid is a change over the grid of the theme the figure is drawn under, where it had been frozen under the default theme, and an inset can hold an inset. See Advanced.

A grid changed with WithGrid that follows the theme after JSON

WithGrid is kept as a value: a change over the grid of whichever theme the figure is drawn under, holding the colour, width, line style, alpha or visibility the author set and nothing else, and a second WithGrid adds to the first. The JSON carries that change (gridChange) next to the grid as it resolved, so a theme set on a figure read back restyles everything the author left alone and keeps what they changed; JSON written before reads back as the grid it drew. ShowGrid(false) under a theme that draws a grid now hides it, where it was drawn anyway. A polar chart's rings and spokes and a 3-D chart's walls follow the same grid in colour, width and line style, where they were a fixed light grey half a pixel wide, and a dotted or dashed polar ring is a closed polyline, since a circle has no dash. The classic theme's grid, when shown, is matplotlib classic's own: black, dotted, 0.5. See Styling.

A neutral colour the theme owns

Theme.NeutralColor is the grey that reference lines, levels, Fibonacci lines, trendlines, waterfall connectors, the stem baseline, a dumbbell's connector and the outlines of a map wear. A theme that sets none derives it from its plot: the library's grey where that stands at 3 : 1 or more against the plot (the contrast WCAG asks of a graphic), otherwise the nearest grey that does. Nord, Dracula, Monokai, Gruvbox and OpsPanel, where the old grey stood at 2.3 to 2.9 : 1, get #8D8D8D, #949494, #868686, #828282 and #787878. ThemeBuilder.WithNeutralColor sets one by hand. A dumbbell's connector and a map's outline take no colour slot, so the next series takes the colour it would have taken without them. The JSON carries neutralColor and wearsNeutral when they are set. See Styling.

A colour bar that follows the normaliser

A colour bar places each tick where the series' normaliser draws the colour of its value, not at the value's share of the range. Under a log normaliser a heatmap of 1 to 1000 had its tick 200 at 0.199 of the bar while its cells are drawn in the colour at 0.767; the tick now stands there, the ticks crowd towards the top of the bar as the colours do, and a tick that would stand within one label of the one before it is left out. A normaliser that bands its colours has its ticks on the band boundaries and a gradient in bands. A spectrogram's bar names the range of its magnitudes where it read 0 to 1. A linear bar draws as it did. See Examples.

Light with a strength of its own

WithLighting(dx, dy, dz, ambient, diffuse) uses all five numbers. The intensity of a face is `ambient + diffuse · (dot

    1. / 2, held to 0 to 1, where dot is the cosine of the angle between the face's normal and the light: a face towards the light gets the sum of the two, one facing away only the ambient. At the defaults, 0.3 and 0.7, that is matplotlib's own shading. Surfaces and 3-D bars share the one rule, so a light of your own (ILightSource) shades a bar as it shades a surface, where the bar ignored it. The scene group no longer carries the data-light-*, data-face-normalanddata-base-color` attributes, which no script read. See Advanced.

A relative rotation graph that always shows its centre

With the quadrant grid on, RelativeRotationSeries ranges its axes over the tails of the assets and over the centre, where RS-Ratio and RS-Momentum are both 100 and the four quadrants meet. When every asset stands on one side of 100 the plot still shows the quadrants and the crosshair, where it had ended before the centre. The price is room: assets clustered far from 100 leave most of the plot empty, which is what keeping the four quadrants in view costs. Without the quadrant grid the range is the tails' alone. See RelativeRotationSeries.

A Marimekko chart's table that names its columns

The table beside a Marimekko chart has a row for each column of the chart, named: the column's name, the edge it begins at and the edge it ends at (in percent of the whole, so the two give its share), and then, for each segment, the height of its cell as a share of the column. For three channels and two brands that is three rows, where the table had listed the points the chart draws, x, Brand A, y2, Brand B, y2 over eight rows. A column with no share has no width and no name, so it is no row and the columns after it keep their own names. A column the segments would all repeat, the edges they stand between, is written once. See Accessibility.

A calendar heatmap's table that gives each day's date

The table beside a CalendarHeatmap has a row for each cell: the weekday (Mon, Tue and so on), the number of the week counted from 0, the date (yyyy-MM-dd) and the value. The heatmap keeps FirstCellDate, the date of the cell in row 0, column 0, which CalendarHeatmap sets, and works the date of every other cell out from its column and row, so the dates travel in the JSON as that one field (firstCellDate). A cell that pads the grid at the start or the end of the span keeps the date it stands for and has no value; a date that cannot be written, one before the year 100, is left empty. See Accessibility.

Violin density from a kernel estimate

A violin's width at each of 100 heights is the Gaussian kernel density of the sample there, with Silverman's bandwidth, scaled so that the widest point is the violin's width. On 12 observations the outline it replaces, a count of the observations in a window, had 3 to 6 bumps and pinched to no width inside the body; the density is one smooth hump. A sample without spread is a spike, as matplotlib draws it. There is no kernel or bandwidth to choose. Every violin and raincloud picture changes. See Chart Types.

A Q-Q plot against other distributions

ProbabilityPlot(sample, reference) draws the Q-Q plot against the distribution a QQReference names: Normal, Exponential, Uniform, LogNormal(sigma), FittedLogNormal(sample), StudentT(degreesOfFreedom), or Of(name, quantile) with the quantile function of one of your own. It follows scipy's probplot: the sorted sample against the reference's quantiles at Filliben's plotting positions, and the least-squares line, checked against scipy for the exponential, uniform, log-normal and Student t. The X axis names a reference other than the normal one, and a reference whose quantile is not a finite number at a plotting position is refused by name. QQPlot is ProbabilityPlot against the normal and draws the picture it always did. See Examples.

A survival chart's risk table and log-rank test

RiskTable(groups) is an axes you stack under KaplanMeier and share the X axis with. For each group and each time it writes the number of subjects still at risk (followed to that time or longer, the count the curve is estimated with), directly under that time on the curve, and below the rows one line with the log-rank test of whether the groups' survival differs: Log-rank χ²(1) = 16.79, p < 0.0001. The test is the Mantel-Cox form that R's survdiff and lifelines compute; Freireich's trial gives 16.79 on one degree of freedom, as they give it. With no event in any group the line says there is nothing to compare, and a single group has no test. times chooses the columns, by default the automatic ticks from 0 to the longest follow-up. Axes that share a scale now share its sticky edges as well as its range, which is what puts a count under its time. See Examples.

More control charts

ShewhartChart(data, rules, limits) draws the parts of a control chart for the data a ControlChartData names: Individuals (what ControlChart draws), MovingRange, XBar, Range, P and C, each with its own estimator. Subgroups are of 2 to 10 observations, with A2, D3 and D4 tabulated for those; the p and c charts take binomial and Poisson limits, and a lower limit that would fall below 0 stands at 0. ControlRules is a flags enum numbered as Nelson numbers his tests: a point beyond a limit, nine on one side of the centre, six rising or falling, fourteen alternating, two of three beyond two sigma, four of five beyond one sigma, fifteen within one sigma and eight beyond one sigma. A pattern is flagged at the point that completes it and at each later point that keeps it, and the zones stand on the limits drawn, given or estimated. ControlChart is unchanged. See Examples.

Anchored VWAP

Vwap(bars, anchor) averages the typical price, (high + low + close) / 3, weighted by volume, from the bar you pick: an earnings day, a swing, a gap. Before the anchor there is no value and the line starts at the anchor bar; at the default anchor, 0, it is the cumulative VWAP to the bit. StreamingVwap.AnchorHere() forgets the sums so that the average restarts at the next bar, AxesBuilder.Vwap draws it, and the DataFrame bridge takes the anchor too. An anchor outside the bars is refused, and arrays of different lengths are refused instead of cut to the shorter. See Chart Types.

Volume profile

VolumeProfile(bars, bins) cuts the range of the closes into equal price bins (12 by default) and adds each bar's volume to the bin its close falls in; a bin takes the closes from its lower edge up to, but not including, its upper edge, and the last bin includes its upper edge. AxesBuilder.VolumeProfile draws the bins as horizontal bars on the secondary X axis, as thick as the bins and growing from the right edge of the plot, the longest covering a quarter of its width, and they come back from JSON with the chart. A bar whose close or volume is missing is skipped. It is the library's 59th indicator. See Chart Types.

A waffle chart

A waffle chart is a grid of square cells, ten by ten unless Rows and Columns say otherwise, filled by category in proportion to its share of the total. Each category takes the whole number of cells its share comes to, the cells left over go to the largest remainders (ties to the category that comes first), and the cells fill from the bottom-left corner, row by row from the left, category by category in the order given. The grid is the largest of square cells that fits the plot area, so the cells are square at any figure size without an aspect setting. A category with no cell keeps its legend entry and its row in the table (category, value, cells). It is a series, WaffleSeries, so it comes back from JSON as itself. An icon of your own repeated once per unit is not drawn: the cells are squares. See Examples.

Calendar of events

CalendarEvents(dates, kinds) lays the days from the earliest event to the latest out as CalendarHeatmap lays them out, every day a cell in the theme's neutral grey, and puts each event inside the cell of its day. Events on one day stand side by side in the order given, every mark as wide as the narrowest stripe of the calendar, and the cell keeps a margin around them. The kinds take the theme's colours in the order they first appear and are the legend's entries. It is a verb, so it draws no new series type: the days are one heatmap and each kind one set of floating bars, and the chart comes back from JSON as those parts. The plot has an aspect of one, so the cells are square. See Examples.

Point and Figure

A Point and Figure chart draws the price as columns of boxes with no axis for time: a column of Xs where the price rose and a column of Os where it fell. PointAndFigure(prices, boxSize, reversal = 3) works from the closes: an X rounds a price down to its box, an O rounds it up, a column grows while the price reaches the next box in its direction, and it gives way to the other kind once the price has come back reversal boxes from the last box drawn. A decimal box never loses a step to binary error. It is a series (PointAndFigureSeries) whose table has a row for each column; SetAspect(1.0 / boxSize) makes the boxes square. See Examples.

Renko

Renko(prices, brickSize) draws the price as a staircase of bricks of one size with no axis for time. The chart is anchored on the first close, a close on the next brick's trigger draws it, a close that covers several bricks draws each, and a reversal needs two bricks from the far edge, so a reversing brick never overlaps the one before it. It is the first verb of PriceAxesExtensions, the family of charts that take a series of prices in time order and draw it without its time axis. The bricks are two floating bar series, those that rose and those that fell, in RenkoParts; an average-true-range brick is one line of your own with the library's Atr. See Examples.

Kagi

Kagi(prices, reversal) draws the price as one unbroken path of vertical lines and short connectors. A line turns when the price has come back by the reversal amount, and it turns thick exactly where the price breaks above the last shoulder and thin exactly where it breaks below the last waist, in the middle of a line, so the width is the price that broke and not a vertex. The path is two lines in one colour, the thick and the thin, in KagiParts, and a stretch with a corner is one polyline that joins cleanly. See Examples.

Gradient fills

GradientColor on a BarSeries or an AreaSeries makes the fill run from the series' colour to that colour: along a bar from its foot to its end, whichever way the bar points or the axis runs, and across an area from its baseline to the point of its top edge furthest from it. A gradient colour with an alpha of its own fades to clear. The blend is a property of the fill, the way a hatch is, so the SVG writes a gradient, the PNG paints one and the PDF keeps it as a vector shading, and a hatch is laid over it. A Sankey link blends in a PNG and a PDF now too. The MAUI view, which paints no gradient, draws the flat colour. See Examples.

Arrows along a connected scatter

ConnectedScatter(x, y) is a marker on every point and an arrow from each point to the next, as one scatter and one quiver in one colour. Each arrow's head lands on the next point and points along the segment as the page draws it, so it is right on a plot wider than it is tall. A missing value leaves out its marker and the arrows into and out of it. It is a verb, so the chart comes back from JSON as its two series. See Examples.

Range frames

A spine has BoundsFrom and BoundsTo, data units on its own axis, as matplotlib's set_bounds has them: null is the edge of the plot, and a bound given the other way round draws the same line. A range frame is both bounds set to the data's range with the top and right spines hidden. The tick marks are not clipped to the bounds. A spine moved to a data value or to a fraction of the axes now takes its ticks and their labels with it, where they had stayed on the plot edge. See Styling.

Two plots matplotlib has

FillBetweenX(y, x1, x2) is an area that lies down: AreaSeries has the orientation the bars have. MatShow(matrix) draws a matrix as square cells, the first row on top, the columns and rows numbered from 0 at round numbers, with a colour bar. Both rest on the aspect setting the axes did not have: SetAspect(1) makes a unit of X as long as a unit of Y on the page, and the plot is the largest rectangle of that shape that fits, centred, at any figure size. The spy plot and the calendar heatmap, the third of the three plots this row once named, set the same aspect now, so their cells are square. See Examples.

Parallel coordinates in each axis's own units

ParallelCoordinates still scales every column to 0..1 by its own smallest and largest value, so dimensions in different units share one vertical axis, and the Y axis carries no ticks. Each column's own line now carries ticks over that column's range: the values the tick locator picks, each a short mark on the line with its number to the left, at the height that value is drawn at. A column whose values are all the same has the one tick, at the middle, and a column with nothing to draw has none. See Examples.

Icicle chart

Icicle(root) draws one row of cells for each level of a hierarchy, the cells of a node side by side under it, each as wide as its share of the node's width, by the rule the sunburst divides an angle by, so the two cannot partition one tree differently. The root is not drawn. It is a series (IcicleSeries) that takes the colour map, limits, labels and normaliser every hierarchical series takes, and it fills the plot area as the treemap does. See Chart Types.

Arc diagram

GraphLayout.Arc is a layout of the network graph, not a series of its own: the nodes stand in a row in the order stored and every edge is a semicircle above it, two cubic Bézier curves, a half circle under SetAspect(1). The head of a directed edge points along the end of its arc, a self-loop has no arc to draw, and the axes make room for the highest arc. See Examples.

Stem-and-leaf plot

StemAndLeaf(sample, leafUnit) puts every observation on a row: the digits above the leaf unit as the stem, the last digit as a leaf, cut toward zero without rounding. Negative values have negative stems and the stem -0, a stem nobody falls on is a row of no leaves, and the leaf unit, a power of ten, is chosen from the sample when you give none. Each leaf has a column of its own in a table with no border and no fill, so the leaves stand under each other because the cells are the same width, not because the font is. That needed the table series to align the text of a column (ColumnAlignments) and to size its columns (ColumnWidths). A line at the lower left says how to read the display. See Examples.

A waterfall's target

Targets holds one absolute level for each step, on the scale the bars stand on (not a change from the running total), and the chart draws a short mark across the bar at that level, a little past it on both sides, over the bar. A missing level is a step with no mark, the value axis makes room for the levels, the table gains a target column only when there are targets, and the marks have no legend entry. TargetColor changes the colour, which is the theme's text colour otherwise. See Examples.

The matplotlib comparison run by CI

The fidelity suite compares the charts with pictures matplotlib drew, by RMS, structural similarity and the distance between the dominant colours. It is in the CI filter and runs as the last step of the build and test job and in the publish job. The colour distance reads every pixel (a lattice of every tenth pixel scored a picture against itself drawn one pixel over at a delta E of 77), every override each test carries is re-set from a measurement on Windows and on ubuntu noble and resolute, the waterfall reference draws what the library draws, and fill_betweenx, matshow and Spine.set_bounds have references of their own. See MatplotlibThemes.

Word cloud

Each word is set in a size between two limits (12 and 60 unless you say otherwise) that follows the square root of its weight. The heaviest word stands at the centre and the rest on a spiral, each at the first place where it fits with two pixels clear. Nothing is dropped silently: when the words do not all fit, every size shrinks toward the smallest together, and a word that still has no room is announced on ChartDiagnostics. A word is moved toward the text colour until it reads against the background (4.5 to 1, 3 to 1 for large words), each word carries its weight as a title, and the SVG asks the browser to set each word to the width it was measured at, so another font cannot make one run into its neighbour. A weight that is not above zero, an empty word and a repeated word are refused when the call is made. See Examples.

Chord diagram

An arc is as long as the row of its group, a ribbon is drawn in the colour of the group that sends more of the two, and the ribbons inside an arc run in the order that makes the ribbons of a complete graph cross least: 0, 1, 5 and 15 crossings for three to six groups, the fewest any layout can give. The names stand outside the ring and never read upside down. A matrix that cannot be drawn (not square, a negative or infinite flow, all zero) is refused by name, and the table is source, target and value for each flow there is. See Examples.

Ternary plot

A ternary axes is a fourth coordinate system beside cartesian, polar and 3-D. It draws a triangle, a grid at every fifth and ticks that run counter-clockwise: the right part along the base, the top part up the right edge, the left part down the left edge. The three parts are named at the corners by the labels the axes already has (SetYLabel at the apex, SetZLabel bottom left, SetXLabel bottom right). The amounts stay as the author knew them, a count, a percentage or a mass, and are closed to fractions only to be placed, so (2, 5, 3) and (20, 50, 30) stand at the same place and the table still shows what was typed. A sample with a negative, infinite or missing part, or with three zeros, is refused by its row and its part. The triangle is a fixed frame: a wheel, a drag or Home over it leaves the chart as it is, because a composition cannot lie outside it. The chart is held against mpltern in the fidelity suite. See Examples.

Piper diagram

The cations (calcium, magnesium, sodium with potassium) stand on one triangle, the anions (bicarbonate with carbonate, sulphate, chloride) on a second, and both on a diamond between and above them, with a marker for each water on each panel in one colour, so a reader follows a water from panel to panel. The input is a WaterSample in mg/L and the percentages are of milliequivalents. The table gives the six percentages, the charge balance error and "balanced" or "unbalanced" for each water: a water whose charges do not balance, beyond 5 %, is flagged and not dropped. A water with an amount that is negative, infinite or missing, or with no cations or no anions, is refused by its row and its ion. See Examples.

Linked selection

RowKeys on a series gives each point the author's own name for its row, and FigureBuilder.LinkSelection(group, selectedRows) names the group the charts of one page share. When a brush ends, the rows whose marks lie inside it are lit on every chart of the group, the others are dimmed, each lit mark says aria-selected, and Escape clears them. It is a window event, so it belongs to the page: nothing crosses tabs. The keys travel in the JSON and name the rows of the table. A brush also says which rows it covers to the one handler a chart has (RowSelectionEvent). See Examples.

Step-through SVG

Every frame is in the file as a nested SVG under ids of its own, one shown at a time, with a slider, a play button and the arrow keys (Home and End go to the ends, the space bar plays and pauses, a click on the track goes to that frame). Without its script the file is its first frame, so the picture in an <img>, a README or a viewer that runs nothing is the frame alone, and a reader who asked their system for reduced motion gets no autoplay. FuncAnimation.Save writes it for a .svg path. The file is as large as all its frames together: no frame is dropped or shared. See Examples.

A live chart that sends its own gestures

The script inside the SVG now takes the connection the .NET client already holds, so a page needs no wiring of its own; one that sets window.__mpl_signalr_connection keeps working, because the script looks at the host of its own chart first and at the page after. The redrawn picture is mounted when the chart is idle. The React, Vue and Angular components mount a chart so that its script runs, which a script that arrives through innerHTML never does, and export mountSvg(host, svg, hub). See Bidirectional SignalR.

Home that returns to the first view in the native controls

A control repaints after every change and gave the controller a new layout each time, and the reset took its "original" range from that layout, so after a zoom Home returned to where the reader already was; a browser had the same fault, because the page sent the range it read off the latest drawing. The figure now remembers the view each axes had before an interaction first moved it, and a reset goes back to it. The range a reset carries is used only for an axes nothing has moved. On a streaming chart the scale mode leaves an axes the reader moved alone until Home hands it back. See Interactive Controls.

The MAUI view on a par with the others

InteractionHost is the one place the WPF, Avalonia, Uno and MAUI controls wire pan, zoom, point picking, brush, hover and Home. On MAUI a drag does what DragGestureAction says (pan, rectangle zoom, brush, span or rotate), a pinch zooms in whole 15 % notches, a tap clicks, a double tap is Home, and hover reaches the host as it does for a mouse. IsInteractive is off by default, so a chart on a scrolling page does not take the drag meant to scroll it. The MAUI canvas draws what the SVG and the PNG draw: hatches, gradients, the arcs of a pie and a donut, and the library's own text metrics. The suite builds and runs without the workload, and the platform build is the Windows job's; the recognizers themselves cannot be driven on a device from here. See Interactive Controls.

Streaming forms of more indicators

A bar can carry its volume (OhlcvBar, AppendBar and OhlcvBarAppended on StreamingCandlestickSeries), and WithStreaming(axes, indicator) attaches any indicator to a candle series. StreamingIndicator<TInput> is the root of every form added in this release, whatever it reads: a bar, a price, or a row of several series. The 46 forms added take one of two shapes, written in StreamingMap for every indicator: a window of the last bars that the batch indicator is run over (24 forms), or the state of the recursion, taken out of the batch loop as a step that the batch indicator folds over too, so the arithmetic is written once (22 forms). The rule every form is held to is that after the bar at index i its value is the last value of the batch indicator over the bars up to i, to 1e-9; a theory runs the batch over every prefix of 200 bars for each form. FibonacciRetracement and VolumeProfile have none, and the map says why. See Streaming.

Transfer entropy over time

The options choose the estimator (the Kraskov–Stögbauer–Grassberger nearest-neighbour estimate is the default; the binned one is what the older constructor still gives), the neighbours, the lag and a series to condition on, a common driver. With a Window the entropy is one value for each bar, worked out from the last bars and never from a later one, NaN until the first window is full, and drawn as a line; a Stride works out every n-th window. StreamingTransferEntropy takes TransferEntropySamples and gives what the batch gives. On a coupling of 1 against noise of 1 the estimate is 0.32 against the 0.35 of the analytic answer, and about 0 the other way. See Examples.

A handler of your own for a chart's gestures

A chart offered a callback for a brush, a hover and a click, and nothing for a zoom, a pan, a legend toggle or a reset. The handler receives every interaction event once, with a context that names the viewer. It is given to ChartSessionOptions.Handle on a server and to the ChartEventHandler of a native control, so one class reacts to a chart wherever it is shown; ChartEventHandlerFaulted reports a handler that throws. A handler that throws costs its own event only. See Interactive Controls.

Several viewers as a designed feature

The hub stamps every event with the connection it came in on and the name the chart gave that connection ("Viewer 1", "Viewer 2"), over whatever the payload claimed. With EnableViewerCursors a page sends where its pointer is, one position in fifty milliseconds, and draws the others' pointers with their names. After a batch in which a viewer moved the shared view every viewer is told who. A chart says when it is busy (data-mpl-busy) and when it is idle (mpl:idle). A session no longer ends when a send throws, and viewers who hover in one burst are each answered. See Bidirectional SignalR.

The Windows heads tested by CI

The MAUI, WPF and Uno packages were built for the first time by the publish job, after the tag. The windows-heads job of the CI workflow now builds them on every push with the steps the publish workflow uses, runs the WPF and Uno suites and the MAUI suite against the real build, and the MAUI suite, which needs no workload, runs on Linux too. See Package Map.

Stairs

Stairs(values, edges, baseline, configure) draws a value for each bin, held level from the bin's left edge to its right edge. It is a verb on the axes builder, so StepSeries gained no property and nothing new reaches the JSON: without a baseline the staircase is one line with no drop before the first edge or after the last (matplotlib's baseline=None), and with a baseline it is one filled area whose top edge is its only stroke, so no edge is drawn twice. StairsParts holds exactly one of Outline and Fill, and it is the series on the axes. The edges number one more than the values or the verb refuses by name; a missing value is a gap in the line and in the fill, never a zero, and a missing edge leaves out both bins that meet at it. A staircase is one series in one colour with one legend entry, and comes back from JSON as that line or area. See Examples.

Line segments between two limits

VLines(x, yMin, yMax) and HLines(y, xMin, xMax) are verbs of their own and not a setting of AxVLine and AxHLine: all the segments are one line in one colour with one legend entry, each segment a polyline of its own, parted from the next by a missing point, so the line comes back from JSON as it was drawn. A limit given once serves every position. A segment with a position or an end that is missing or infinite is left out whole and leaves no stub. One internal path owns this geometry for VLines, HLines, Triplot and the stems of a correlation. See Examples.

Contour labels that follow the line

A label stands at the middle of its line by arc length and is turned to the chord across its width there, folded so that it never reads upside down. Its text is in the colour of the line, on a patch the colour of the theme's background that turns with it, so a dark theme gets no white box, and the width the patch has is the measured width of the text, not a guess from its length. A line shorter than 1.2 times the width of its label gets none, as in matplotlib. Every line is drawn before any label, and the number is formatted the same in every culture, as the gauge's is now. See Examples.

Power spectrum, cross spectrum and coherence

Psd, Csd and Cohere are verbs of a new family of their own, SignalAxesExtensions, because a signal is neither x and y arrays nor a sample: its order is its meaning. Welch's average of windowed segments is one internal estimator, set by one SpectralOptions value that holds matplotlib's defaults for whatever it leaves out: a window of your choice (SpectralWindow), a detrend (SpectralDetrend), a segment of any length, an overlap, padding, a centre frequency, and density or spectrum scaling. Under it the library has a Fourier transform of exactly the length asked for, not only a power of two, and one owner of the Hann window. Psd and Csd draw ten times the logarithm of the density and Cohere the coherence on the linear scale; each is one line with one legend entry, and a frequency with no power is a gap, never minus infinity. A segment that holds a missing sample is left out of the average, when none is left nothing is drawn, and Cohere needs two segments at least. The same work corrected the spectrogram, which weighted each window by the Hann window twice and drew its rows on the wrong frequencies; it now weights once and puts each row on the frequency of its bin. See Examples.

Auto- and cross-correlation

Acorr and Xcorr are verbs of the same family. The correlation at each lag is divided by the energy of the signal (by the product of the roots of the two energies for Xcorr) unless Unnormalised asks for the raw sums, and CorrelationOptions holds the lags (ten either side, as matplotlib's), a detrend and the choice of how it is drawn. The stems are one line of a segment from 0 to each lag with one legend entry, and a reference line at 0 that takes no colour of its own; with Markers the lags and the correlations are drawn alone as circles. The two are never drawn together, as matplotlib's usevlines chooses one or the other, and CorrelationParts gives the line and the reference line, which is null for markers. When y is x some samples later the chart peaks at the negative lag of that many samples. A signal with a missing sample has every lag missing, so only the reference line is drawn, and a normalised correlation of a signal with no energy is missing as well. A verb refuses as many lags as the signal has samples. See Examples.

Magnitude, phase and angle spectrum

Three more verbs of the family read one transform of the whole signal, with nothing averaged, set by one SpectrumOptions value: the sample rate, the window (Hann by default, as in matplotlib), padding and a frequency offset. The magnitude is divided by the sum of the window, so a constant signal reads 1 at frequency 0, and MagnitudeScale.Decibel draws twenty times its logarithm. The phase is unwrapped along the frequencies, so a delay is a falling line, and the angle is wrapped between minus and plus pi. Each is one line, and a sample that is missing leaves every frequency missing. See Examples.

The mesh of a triangulation

Triplot(x, y, triangles) draws the edges as one line with one legend entry: an edge two triangles share is drawn once, each edge is a polyline of its own, and the edges are drawn at the coordinates you gave, never at the slightly nudged copy a triangulation returns. Without triangles the points are triangulated by the rule that Tripcolor now shares with it, so the two draw one mesh, and that rule has one owner. A point that is missing leaves out every edge that runs to it, a list of triangles that names a point there is not is refused, and fewer than three points draw an empty line. Markers at the nodes come from Scatter over the same points. See Examples.

Text, legend and image on the figure

FigText, FigLegend and FigImage on FigureBuilder put text, a legend and an image on the figure itself, in the figure's own coordinates: fractions counted up from the bottom-left corner for text, pixels for an image. One pass draws the images under the subplots and the colour bar, the texts and the legend over them, and both the SVG and the raster renderer run it, so every output shows the same, on a figure with no subplot too; an empty figure with a colour bar now draws its bar as well. The legend lists the labelled series of every subplot, each entry that looks the same once, and is static as matplotlib's is; LegendPosition.Best is the upper right at figure level. The three come back from JSON as texts, images and legend, the MCP server reads them, and the data table gains a table of the texts and one of the images; a 1.27.0 reader skips them. In 1.30.0 each FigLegend adds a legend, as each fig.legend() does (JSON legends, an older legend read as the first), and a legend at an outside place stands at the middle of that edge of the figure, where ConstrainedLayout keeps room for it, as matplotlib's constrained layout does. See Examples.

The zoom of an inset

IndicateZoom on the builder of an inset sets its ZoomIndicator, and the parent draws a rectangle over the region the inset shows, spanning the limits the inset draws (its own, or the margins of one that scales itself to its data), and the two lines from it to the inset's frame that matplotlib's rule keeps. The rule is applied in pixels, so a reversed or logarithmic parent axis needs no case of its own. It is drawn just under the inset, as matplotlib draws it, on a Cartesian, ternary or polar parent (a 3-D parent draws none: matplotlib places that rectangle in the flat view of the 3-D axes, not in its data). It comes back from JSON as zoomIndicator on the inset and the MCP server reads it. The same work corrected the comment of InsetAxes, whose y is the inset's top edge counted down from the top of its parent. See Examples.

Rectangles, polygons and arrows

An axes held series, annotations, reference lines and spans, and none of them was a shape of its own: a span is a band across the whole plot, and an annotation draws an arrow only from its text. A patch is a shape you make, style through its own properties and add with AddPatch, as matplotlib's add_patch adds one: on the axes builder, on the figure builder for the default axes, or on Axes, which returns the patch. Rectangle is a corner, a width and a height, turned by Angle about the corner; Polygon runs through its vertices and closes unless Closed is false; Arrow is matplotlib's FancyArrow, every size in data units, with matplotlib's defaults (a shaft 0.001 wide, a head three times as wide and one and a half times as long as it is wide, its tip a head length past the end point), its half arrows and its overhang. Every vertex is held to the one matplotlib computes for the same patch. A patch is drawn after the spans and before the reference lines and the series, through the axes' transform, so it follows a reversed, log or broken axis; the automatic range holds every patch; a labelled patch has a row in the legend, a rectangle in its own colours after the series; and the JSON writes it as patches, which the MCP server reads and checks, drawing a spec that holds overlays and no series.

Left out on purpose: a table of the patches beside the chart, as the accessible table lists data and a patch is a drawing. Where it differs from matplotlib: under the library's own themes the grid stands under the patches and the spans, an axes of patches alone frames them and a rectangle of no size counts in the range (the matplotlib themes follow matplotlib on all three); and a coordinate a log axis cannot place is pinned to the start of the axis, where matplotlib pushes it a thousand decades out and clips it at the same edge, so the picture is the same. In 1.30.0 a patch's Alpha replaces the opacity of its colours as matplotlib's does, a patch takes a ZOrder, a rectangle takes a RotationPoint (matplotlib's rotation_point), a curved patch of negative size is mirrored, under the matplotlib themes an axes of patches alone stays at 0 to 1 and a rectangle of no size is left out of the range as add_patch leaves it, under the matplotlib themes the grid stands over patches and spans as matplotlib draws it, the legend lists the series and the patches in the order they were added, a click on a patch's row hides and shows it, under the matplotlib themes a figure legend lists every row of every subplot as fig.legend() does, and a polar, ternary or 3-D axes draws its patches (on a 3-D axes on the plane its Z and ZDir name). See Examples.

Circles, ellipses, wedges and arcs

The row had to say how a circle is drawn on a log axis, and the answer is matplotlib's: a curve is made of cubic Bézier curves built by Path.unit_circle and Path.arc in data units, and every control point goes through the axes' transform, so on a log axis a circle bends as it does there and a straight edge between two corners stays straight. The outline needs no pixel, so the automatic range is never worked out from the drawing it decides. Circle and Ellipse take a centre and a radius or two diameters, Wedge takes a slice of a disc between two angles, counter-clockwise, or with a Width the slice of a ring, and Arc is the open curve of an ellipse, with no face, as matplotlib refuses to fill one; an arc's angles name directions from its centre and are stretched on an ellipse as matplotlib stretches them. The range takes a curve where it reaches, not where its control points stand. A shape is sized in data units, so SetAspect(1) makes a circle round on the page; on axes of different scales it is an ellipse there. A curved patch of size 0 draws nothing and a negative size mirrors the shape, as matplotlib's scale does. See Examples.

A second axis in other units

Link(transform) on the builder of the top X axis, or of a Y axis added past the primary one, makes it matplotlib's secondary_xaxis or secondary_yaxis. A linked axis has no range and no series of its own: it shows the primary's range and scale written through an AxisTransform (Linear, Reciprocal, Logarithm, Power, or Of a pair of functions of your own), and it stands each tick where the primary has the value the tick maps back to. Its ticks come from its own locator, else from a log locator over a log primary (matplotlib's functionlog), else from the default. A limit set on it changes nothing, a pan or a zoom moves it with the primary, and a transform that cannot place the primary's range draws no ticks and says why in the figure's diagnostics. The named transforms travel through JSON and the MCP server as link; a pair of functions is code, so it is left out and the axis reads back unlinked. The same work made the top X axis follow its own tick locator, spacing, scale and minor ticks, which it ignored, and stand a series on it where a log or broken primary Y axis puts it.

In 1.30.0 a linked X axis also stands below the plot (WithAddBottomXAxis, matplotlib's secondary_xaxis('bottom')), stacked under the primary X axis' tick labels and title or at a fraction of the plot's height with SetLocation, in the container that stacks the Y axes, and a link set on a primary axis is reported in the figure's diagnostics. Power stays defined on 0 and above, where an inverse from value to value cannot know which side of 0 a range lies on. The builders refuse a series on a linked axis and a link on an axis with series; a figure written by hand that gives a linked axis a series draws the link. See Examples.

What is still to come

Nothing waits on this list. The rows that stood here were built, and they are above, under what is done. A Discussion or an Issue that needs a row is what puts the next one here.

What is not on this list

A graphics card

Measured on the library's own hot path, drawing pixels is 87 ms of a 286 ms render; the other 199 ms is layout, culling and building paths, which a graphics card does not touch. Limiting the points drawn took a series of a million points from 22.3 s to 23 ms on the processor. A GPU backend would be a second renderer and a native dependency on every platform, and it could never be tested on a headless Linux runner.

Full TeX

MathText follows matplotlib's mathtext, which is not TeX either: it is a parser of its own (read from matplotlib 3.11.2: 634 symbol names, 32 function names, 23 accents and 12 spaces), and its text.usetex hands the text to the latex and dvipng programs of the machine. A figure drawn here needs nothing installed, on a server, in a container or on a runner with no TeX, and an engine inside the package would be a native dependency on every platform, as a graphics card would. MathText draws the fractions, roots, scripts, accents, font switches, delimiters and matrices of that parser, every one of its symbol and function names, its accents and its spaces, read from matplotlib into one table.

More for Polyglot Notebooks

MatPlotLibNet.Notebooks stands still: the runtime under Polyglot Notebooks has ended, and notebook work goes into Verso.

An extension for Visual Studio Code

Verso runs in Visual Studio Code and in the browser, so MatPlotLibNet.Verso is the answer for a notebook there, and the MCP server gives an agent the same rendering. An extension of the library's own is not on this list until something is asked that those two do not cover.

Charts as sound

A chart turned into sound is a different medium from the pictures this library draws. The data table beside a chart is its way to a reader who does not see it; see Accessibility.

A one-call connected scatter or fan chart

A connected scatter is already one call, Plot with a marker on each point, so it gets no verb of its own; its arrows are a row above. A fan chart is a set of bands in one colour that fades outward: one FillBetween per band, given the same Color and a smaller Alpha for each wider band, draws it. The verbs of this library shape data (sort, bin, estimate, stack, fold), and a fan chart has none to shape: its band edges arrive computed, so a verb would only repeat that call.

MatPlotLibNet 1.30.0

On the docs site

Clone this wiki locally