TokenVector.Plot 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package TokenVector.Plot --version 1.0.0
                    
NuGet\Install-Package TokenVector.Plot -Version 1.0.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="TokenVector.Plot" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TokenVector.Plot" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="TokenVector.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 TokenVector.Plot --version 1.0.0
                    
#r "nuget: TokenVector.Plot, 1.0.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 TokenVector.Plot@1.0.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=TokenVector.Plot&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=TokenVector.Plot&version=1.0.0
                    
Install as a Cake Tool

TokenVector.Plot

<div align="center">

Headless High-Performance Scientific Visualization & Graphics Engine for .NET 8 / 9 & TokenVector Language
SIMD AVX2 Accelerated • Zero-GC Hot-Path • Nature/IEEE Publication Quality • 100% Pure C#

License: MIT .NET 8 TokenVector Language Zero-GC Headless

</div>


🌐 The TokenVector Language & Ecosystem Platform

TokenVector.Plot is the official Scientific Visualization & Graphics Engine (Priority 5) of the unified TokenVector Programming Language & AI Ecosystem Platform.

⚡ 1. The TokenVector Programming Language (TokenVector / tkvc)

TokenVector (.tkv) is a self-hosted, compiled high-performance programming language designed to replace Python in high-performance computing, AI, and systems programming:

  • 100% Python Syntax Compatibility: Developers write familiar Python syntax while achieving C/C++ and native .NET execution speeds.
  • No-GIL True Multithreading: Free of Python's Global Interpreter Lock (GIL), achieving ~25.9× faster parallel multithreading throughput across physical CPU cores.
  • Ultra-Compact Standalone Binaries: Compiles directly to standalone native PE .exe / .NET IL bytecode (~8.5 KB – 9 KB footprint) with zero Python runtime bundling.
  • Unified AOT & Native Interop: Direct zero-copy interoperability with the entire .NET runtime, SIMD hardware intrinsics (AVX2 / AVX-512), and NuGet ecosystem.

📦 2. Specialized Ecosystem Libraries

  • TokenVector.Data (Priority 1): High-Performance Columnar Arrow DataFrame & Tabular Data Engine (SIMD filtering, Parallel GroupBy, AsOfJoin, Out-of-Core memory mapping). Instant zero-copy charting via df.Plot.*.
  • TokenVector.Numerics (Core Computational Infrastructure): N-Dimensional Tensor (NDArray<T>), Automatic Differentiation (Autograd), Linear Algebra, FFT, Optimization, Signal Processing, Quantum Computing, and Computational Physics. Direct zero-copy visualization via array.Plot.*.
  • TokenVector.Text (Priority 2): Native NLP & Tokenization Engine (BPE, WordPiece, Unigram, Unicode NFC/NFKC normalization, Vocabulary management) for Large Language Models.
  • TokenVector.Vision (Priority 3): Computer Vision & Image Processing Engine (SIMD color space conversion, Tensor image transformations, convolutional filters, data augmentations).
  • TokenVector.Inference (Priority 4): High-Throughput Model Serving & Tensor Runtime (INT8/FP8 quantization, KV-cache acceleration, ONNX Serving).
  • TokenVector.Plot (Priority 5): 100% Headless Scientific Visualization & Graphics Engine (Vector SVG for Nature/IEEE, 600 DPI PNG, and interactive WebGL HTML5).

🌟 Key Highlights of TokenVector.Plot

  • 100% Pure C# Headless Engine: No dependencies on System.Drawing.Common, GDI+, SkiaSharp native binaries, X11, Wayland, or xvfb.
  • Zero-Copy Interop: Direct pointer (float*) and span integration with TokenVector.Numerics and TokenVector.Data.
  • Extreme Throughput Scatter (SIMD Binning): Render 1,000,000 points in ~25 ms (166x faster than Matplotlib) and 10,000,000 points in ~80 ms with adaptive alpha density blending.
  • Scientific Algorithms:
    • Talbot / Wilkinson Ticks Engine: Aesthetic, optimal axis ticks with exponent scaling.
    • Marching Squares: Sub-pixel contour isolines and filled gradient bands.
    • RK4 Streamlines: 4th-order Runge-Kutta fluid flow integration.
    • 3D Surface & Phong Lighting: Full software Z-Buffer depth testing and Gouraud/Phong normal shading.
  • Multi-Format Publication Exporters:
    • Vector SVG: Standards-compliant W3C XML SVG for Nature/IEEE publications.
    • Raster PNG (300 - 600 DPI): Custom multi-threaded SIMD AVX2 software rasterizer with pure C# Deflate/Zlib encoder and physical pHYs resolution chunks.
    • Interactive HTML5 / WebGL: Single standalone file (<50 KB) with hardware-accelerated shaders for 60 FPS Pan, Zoom, and Tooltips.

📊 Competitor Performance Comparison

Benchmark Metric TokenVector.Plot (.NET 8 SIMD) Matplotlib (Agg) (CPython) Plotly (Python/JS) ScottPlot 5 (.NET/Skia) Speedup vs Matplotlib
Scatter 100K Points 5.51 ms ~350 ms ~1,500 ms (DOM) ~25 ms 63.5x faster
Scatter 1M Points 25.31 ms ~4,200 ms Crash / OOM ~180 ms 166.0x faster
Scatter 10M Points 81.37 ms Failed (OOM) Failed (OOM) Lag / Crash Ultra High-Throughput
Hot-Path GC Alloc 0 Bytes (Hot Loop) ~450 MB RAM ~1.2 GB RAM GC Pressure Zero-GC Verified
Marching Squares (1000x1000) 102.19 ms ~450 ms ~1,800 ms N/A 4.4x faster
3D Surface Z-Buffer 59.81 ms ~1,200 ms (mplot3d) WebGL Client N/A 20.1x faster
600 DPI 17.28 MPix Export 762.60 ms ~6,500 ms N/A ~1,800 ms 8.5x faster
Interactive HTML Size 11.44 KB N/A 3.8 MB - 12 MB N/A 332.2x smaller

🚀 Quick Start

1. Basic Line Plot with Nature Theme

using TokenVector.Plot.Core;
using TokenVector.Plot.Charts.Statistical;
using TokenVector.Plot.Themes;

float[] x = { 0, 1, 2, 3, 4, 5 };
float[] y = { 0, 1, 4, 9, 16, 25 };

var fig = Figure.Create(widthInches: 6.4, heightInches: 4.8, dpi: 300f);
fig.Theme = StyleTheme.Nature;
fig.Title = "Quadratic Growth Curve";
fig.Axes.XLabel = "Time (s)";
fig.Axes.YLabel = "Energy (J)";

var line = new LinePlot(x, y) { Label = "Model Prediction", Color = Color.FromHex("#E64B35") };
fig.Axes.AddElement(line);

// Export to SVG, 600 DPI PNG, or Standalone WebGL HTML5
fig.SaveSvg("chart.svg");
fig.SavePng("chart.png");
fig.SaveHtml("chart.html");

2. Zero-Copy Integration with TokenVector.Numerics

using TokenVector.Numerics.Core;
using TokenVector.Plot.Interop;

// 2D Matrix Contour Plot
var grid = new NDArray<float>(100, 100);
// fill tensor...
var fig = grid.Plot().Contour(numLevels: 12);
fig.SaveSvg("contour.svg");

// 3D Surface Plot with Phong Shading
var surfFig = grid.Plot().Surface3D();
surfFig.SavePng("surface3d.png");

3. Zero-Copy Integration with TokenVector.Data DataFrame

using TokenVector.Data.Core;
using TokenVector.Plot.Interop;

var df = DataFrame.FromCsv("experiment_data.csv");
var fig = df.Plot().Scatter("Voltage", "Current", pointSize: 3.5f);
fig.SavePng("scatter_600dpi.png");

📜 License

MIT License. Developed by TokenVector Architecture Team.

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
1.0.1 104 9/25/2026
1.0.0 108 9/14/2026