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
<PackageReference Include="ILNumerics.Community.TikzExport" Version="7.0.0.247" />
<PackageVersion Include="ILNumerics.Community.TikzExport" Version="7.0.0.247" />
<PackageReference Include="ILNumerics.Community.TikzExport" />
paket add ILNumerics.Community.TikzExport --version 7.0.0.247
#r "nuget: ILNumerics.Community.TikzExport, 7.0.0.247"
#:package ILNumerics.Community.TikzExport@7.0.0.247
#addin nuget:?package=ILNumerics.Community.TikzExport&version=7.0.0.247
#tool nuget:?package=ILNumerics.Community.TikzExport&version=7.0.0.247
TikzExport
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
Export scene to a string
// Create or obtain an ILNumerics scene (pseudocode) // var scene = new Scene() { ... }; string tikz = TikzExport.ExportString(scene);
Export scene to a file
string filePath = "figure.tikz"; TikzExport.ExportFile(scene, filePath); // The file 'figure.tikz' now contains the TikZ/PGFPlots markup
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();
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 | Versions 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. |
-
net8.0
- AnyAscii (>= 0.3.3)
- ILNumerics.Computing (>= 7.2.41)
- ILNumerics.Drawing (>= 7.2.41)
- ILNumerics.Toolboxes.Drawing2 (>= 7.2.41)
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 |