ILNumerics.Community.TikzExport
7.3.1.296
dotnet add package ILNumerics.Community.TikzExport --version 7.3.1.296
NuGet\Install-Package ILNumerics.Community.TikzExport -Version 7.3.1.296
<PackageReference Include="ILNumerics.Community.TikzExport" Version="7.3.1.296" />
<PackageVersion Include="ILNumerics.Community.TikzExport" Version="7.3.1.296" />
<PackageReference Include="ILNumerics.Community.TikzExport" />
paket add ILNumerics.Community.TikzExport --version 7.3.1.296
#r "nuget: ILNumerics.Community.TikzExport, 7.3.1.296"
#:package ILNumerics.Community.TikzExport@7.3.1.296
#addin nuget:?package=ILNumerics.Community.TikzExport&version=7.3.1.296
#tool nuget:?package=ILNumerics.Community.TikzExport&version=7.3.1.296
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
The following plot types are supported:
| Plot family | Export behavior |
|---|---|
| LinePlot | 2D/3D coordinates, markers, legend entries, logarithmic axes |
| ErrorBarPlot | Horizontal/vertical asymmetric bars and their caps |
| Surface | Structured grids, including non-square grids, plot-local sampled colormaps |
| FastSurface | Triangle meshes and face colors |
| ImageSCPlot | Scalar cells with actual colormap colors; linear 2D axes |
| ContourPlot | Contour lines; filled regions and labels are not exported |
| BoxPlot, Candlestick, StackedAreaPlot, FillArea | Fills and outlines |
| Lines, LineStrip, Points | Lines, line strips and point markers |
| Triangles, TrianglesStrip, TrianglesFan | Filled polygons and 3D meshes; vertex colors approximated per face |
| SplinePlot | Interpolated curves with original markers |
| BarPlot, BarPlotEx | Grouped and stacked bars, horizontal and vertical orientation, baselines and custom colors |
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 100 x 100 mm per plot cube.
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 markupExport with diagnostics
var result = TikzExport.ExportWithReport(scene); string tikz = result.Tikz; foreach (var issue in result.Issues) Console.WriteLine($"Plot {issue.PlotCubeIndex}: {issue.NodeType}: {issue.Message}");Specify a custom canvas size (millimeters)
int mmWidth = 160; int mmHeight = 120; var canvasSize = new System.Drawing.Size(mmWidth, mmHeight); string tikz = TikzExport.ExportString(scene, canvasSize); // OR TikzExport.ExportFile(scene, filePath, canvasSize);
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 | net10.0 is compatible. 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. |
-
net10.0
- AnyAscii (>= 0.3.3)
- ILNumerics.Computing (>= 7.4.62)
- ILNumerics.Drawing (>= 7.4.62)
- ILNumerics.Toolboxes.Drawing2 (>= 7.4.62)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.