ILNumerics.Community.TikzExport 7.0.0.247

dotnet add package ILNumerics.Community.TikzExport --version 7.0.0.247
                    
NuGet\Install-Package ILNumerics.Community.TikzExport -Version 7.0.0.247
                    
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="ILNumerics.Community.TikzExport" Version="7.0.0.247" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ILNumerics.Community.TikzExport" Version="7.0.0.247" />
                    
Directory.Packages.props
<PackageReference Include="ILNumerics.Community.TikzExport" />
                    
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 ILNumerics.Community.TikzExport --version 7.0.0.247
                    
#r "nuget: ILNumerics.Community.TikzExport, 7.0.0.247"
                    
#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 ILNumerics.Community.TikzExport@7.0.0.247
                    
#: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=ILNumerics.Community.TikzExport&version=7.0.0.247
                    
Install as a Cake Addin
#tool nuget:?package=ILNumerics.Community.TikzExport&version=7.0.0.247
                    
Install as a Cake Tool

TikzExport

Nuget

Export functionality for ILNumerics (http://ilnumerics.net/) scene graphs and plot cubes to TikZ/PGFPlots (LaTeX graphics package, see Wikipedia).

About TikZ/PGFPlots

PGF/TikZ is a pair of languages for producing vector graphics from a geometric or algebraic description. PGF is a lower-level language that provides the primitives for drawing graphics, while TikZ is a collection of higher-level macros built on top of PGF that make it easier to describe complex figures. Together they are commonly used in LaTeX documents to produce technical illustrations, plots, and publication-quality figures. PGFPlots is a TeX package that builds on PGF/TikZ and provides a high-level interface specifically geared toward creating 2D and 3D plots (line plots, surface plots, error bars, etc.). Exporting ILNumerics scenes to PGF/TikZ/PGFPlots allows embedding figures directly in LaTeX documents while retaining sharp vector graphics and fine control over styling.

Features

  • Export ILNumerics scene graphs or individual plot cubes to TikZ/PGFPlots
  • Produces TikZ code suitable for inclusion in LaTeX documents (usually saved as *.tikz files)
  • Supports the most common plot types used in ILNumerics (see supported plot types)

Supported plot types

As of March 2025 (only) the following plot types are supported:

  • LinePlot
  • ErrorBarPlot (y-error only)
  • Surface
  • FastSurface

Getting started

Install the NuGet package:

dotnet add package ILNumerics.Community.TikzExport

Basic usage examples

Two main entry points are provided:

  • ExportString(scene) � returns the TikZ/PGFPlots code as a string
  • ExportFile(scene, filePath) � writes the TikZ/PGFPlots code to a file (usually with .tikz extension)

Both methods accept an optional Size canvasSize parameter that specifies the output canvas in millimeters. If omitted, the default is 120 x 100 mm.

Examples

  1. Export scene to a string

    // Create or obtain an ILNumerics scene (pseudocode)
    // var scene = new Scene() { ... };
    
    string tikz = TikzExport.ExportString(scene);
    
  2. Export scene to a file

    string filePath = "figure.tikz";
    TikzExport.ExportFile(scene, filePath);
    // The file 'figure.tikz' now contains the TikZ/PGFPlots markup
    
  3. Convert Scene to a Chart object (CSPlotlySlim Chart) for programmatic inspection

    CSPlotlySlim.Chart.Chart? chart = ILNumerics.Community.WebExport.WebExport.GetChart(scene);
    // (optional) Manipluate chart object as needed
    string? html = chart?.Render();
    
  4. Specify a custom canvas size (millimeters)

    int mmWidth = 160;
    int mmHeight = 120;
    var canvasSize = Size(mmWidth, mmHeight);
    
    string tikz = TikzExport.ExportString(scene, canvasSize);
    // OR
    TikzExport.ExportFile(scene, filePath, canvasSize);
    

Notes and tips

  • The exported TikZ code is intended to be included in LaTeX documents. To compile the output you will typically need to include the pgfplots package in your LaTeX preamble (for example: \usepackage{pgfplots} and \pgfplotsset{compat=1.18}).
  • Some complex ILNumerics features or custom shaders are not translated and may be omitted or approximated in the export.
  • If you need additional plot types or custom styling, consider post-processing the generated TikZ code or extending the exporter.

Contributing

Contributions, bug reports and feature requests are welcome. Please open an issue or a pull request on the GitHub repository.

License

ILNumerics.Community.TikzExport is licensed under the MIT license (http://opensource.org/licenses/MIT). See LICENSE.txt for details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
7.0.0.247 107 9/4/2025