Marey.Plot 0.3.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Marey.Plot --version 0.3.0
                    
NuGet\Install-Package Marey.Plot -Version 0.3.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Marey.Plot" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Marey.Plot" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Marey.Plot" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Marey.Plot --version 0.3.0
                    
#r "nuget: Marey.Plot, 0.3.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Marey.Plot@0.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Marey.Plot&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Marey.Plot&version=0.3.0
                    
Install as a Cake Tool

Marey.Plot

The chart API of Marey, a dimensionally-typed visualization system for F#. This is the package most people install.

#r "nuget: Marey.Plot"
#r "nuget: Marey.Backend.Svg"

open Marey

let t = Array.init 24 (fun i -> float i * 0.4<s>)
let x = t |> Array.map (fun t -> 0.5 * 9.81<m/s^2> * t * t)

Chart.line U.second U.metre t x
|> Chart.withTitle "Free fall"
|> Chart.toSvg SvgBackend.render "fall.svg" (Chart.size 800.0 500.0)

That prints an x axis reading t [s] and a y axis reading x [m] with nothing configured. The scale, the domain, the SI prefix, the tick values, the tick labels and both axis titles are derived from the two unit witnesses. x is never annotated as a length — the compiler works that out — and plotting metres against metres on these axes is a compile error.

What is in it

  • Chart — twelve geoms: line, scatter, area, bar, errorbar, step, ribbon, tile, rect, image, segment and text, with box plots and violins by category under Chart.Category. Most have an add* that layers onto the last panel, and Chart.Plain covers data that genuinely has no units.

  • The plot encoding block — for data that is a table rather than two arrays. Declares x, y, colour, shape and size in one place, with each dimensioned channel checked against its witness.

  • Channels. One colour or marker shape per category, with a legend that names the levels; or a colour or size driven by a quantity, which brings a colorbar labelled from its unit witness.

  • Statistics — histogram, kernel density, ECDF, least-squares fit, and a five-number summary. The measures carry through: a fit of metres against seconds has a slope of type float<m/s>.

  • Facets. facetWrap gives one panel per level of a key, over shared axes.

  • Themes. Six, all measured against the colour validator below. Theme.tikz inherits the host LaTeX document's fonts.

  • Palettes — Okabe–Ito, viridis, cividis, magma and an Oklab diverging ramp, with a colour-vision-deficiency and contrast validator that every shipped theme is checked against.

  • A measure–arrange constraint layout, and the axis and legend compilers.

  • The scene storyboard block, for a figure that moves:

    open Marey.Storyboard
    
    let intro =
        scene {
            let! curve = draw measured |> over 1.2<s>
            do! wait 0.5<s>
            do! parallel' [ curve |> morphTo fitted |> over 2.0<s>
                            curve |> zoomToX (0.0, 8.0) |> over 2.0<s> ]
            do! highlight curve.[42]
        }
    
    let anim = animate 32 (Chart.size 640.0 400.0) intro
    

    let! binds a name for something on stage; animate lays the whole shot out once, against the union of every state it sampled, so the panel holds still while the data moves. Seeking is evaluation, so anim.At 2.7<s> is a direct call and frames render in any order, in parallel.

  • The frame writer. Film.ofStory pairs the scene animation with the layout it is drawn inside, and Frames.write renders every frame over Array.Parallel.map and numbers them onto disk as frame-00000.png. The concurrent and serial passes produce the same bytes in the same order, and one memoised ITextMeasurer serves the whole film — because font resolution walks a family stack against whatever is installed, and a measurer per thread is a chance for one frame of a video to be set in a different typeface from the frame before it.

  • Per-layer styling that survives a theme change where it was set explicitly and is recoloured where it was not, which is what makes withTheme safe to apply last.

No backend reference

Marey.Plot does not depend on a renderer. A backend is a function passed in at render time, which is why the same figure goes to SVG or to LaTeX without the figure knowing either exists. Install one:

Depends on Marey.Core, Marey.Units and Marey.Anim — the last because the storyboard names an Anim and a Figure in one signature. It is 36 KB and has no dependencies of its own.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Marey.Plot:

Package Downloads
Marey.Html

HTML renderings of Marey values for notebooks: figures and scenes as inline SVG, colours as swatches, ramps resampled through Oklab, palettes, dimensions, unit witnesses and erased scales, and a live figure's page. Host-neutral and dependency-free.

Marey.Tools.Video

Encode a rendered frame sequence to video by shelling out to ffmpeg. Degrades to the numbered frames when ffmpeg is absent.

Marey.Interact

Interaction for Marey: typed controls (a slider over kelvin hands the view kelvin, and labels itself in them), composed into a live figure by an applicative block, and stepped by a pure function a notebook host drives: controls, zoom, pan, a readout in the axes' units, and recordings that replay as films.

Marey.Fields

Fields for Marey: scalar and vector fields on dimensioned planes, sampled onto grids, with gradient, divergence, curl and the Jacobian in the units the types work out. A phase space with a different unit on each axis is a first-class domain.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.0 248 10/17/2026
0.6.0 246 10/11/2026
0.5.0 218 10/10/2026
0.4.0 205 10/8/2026
0.3.1 154 10/5/2026
0.3.0 151 10/5/2026
0.2.0 164 8/21/2026
0.1.1 152 8/19/2026
0.1.0 148 8/19/2026
0.1.0-rc.1 104 8/18/2026