TokenVector.Plot 1.0.1

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

TokenVector.Plot

<div align="center">

<img src="logo.png" alt="TokenVector.Plot Logo" width="120" height="120" />

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

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

</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, natively ported and implemented in the TokenVector Language (.tkv) and compiled directly to managed CIL (TokenVector.Plot.dll) and packaged into TokenVector.Plot.1.0.1.nupkg.

⚡ 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).
  • TokenVector.Numerics (Core Computational Infrastructure): N-Dimensional Tensor (NDArray<T>), Automatic Differentiation (Autograd), Linear Algebra, FFT, Optimization, Signal Processing.
  • TokenVector.Text (Priority 2): Native NLP & Tokenization Engine (BPE, WordPiece, Unigram, Unicode NFC/NFKC normalization) for Large Language Models.
  • TokenVector.Vision (Priority 3): Computer Vision & Image Processing Engine (SIMD color space conversion, Tensor image transformations).
  • TokenVector.Inference (Priority 4): High-Throughput Model Serving & Tensor Runtime (INT8/FP8 quantization, KV-cache acceleration).
  • 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

  • Pure Native TokenVector Language Implementation (tvsrc/*.tkv): The core engine, math, styling, and SVG rendering are natively implemented in .tkv.
  • Pre-Compiled .NET Assembly (TokenVector.Plot.dll) & NuGet Package (TokenVector.Plot.1.0.1.nupkg): Seamless drop-in dependency for C#, F#, and .NET applications.
  • 100% Headless Architecture: Zero dependencies on System.Drawing.Common, GDI+, SkiaSharp native binaries, X11, Wayland, or xvfb.
  • Comprehensive Chart Coverage: Line plots, scatter charts, bar histograms, 2D matrix heatmaps, statistical box plots, automated legend, and interactive HTML cards.
  • Publication Themes & Aesthetics: Built-in scientific themes (Science, Nature) and colormaps (Viridis).
  • Precision Coordinate Math & Ticks: Linear and logarithmic coordinate mapping with sub-pixel alignment.

📊 Benchmark & Competitor Comparison

Head-to-head empirical benchmarks performed on the same 64-bit environment, comparing TokenVector.Plot (pure .tkv compiled to CIL) against Matplotlib (Agg backend, CPython 3.14) and Plotly:

1. Empirical Benchmark Comparison Table

Benchmark Task / Scenario TokenVector.Plot (Native .tkv + CIL) Matplotlib (Agg) (CPython) Plotly (Python / JS DOM) Speedup vs Matplotlib
Bar Plot (1,000 Bars) 94.70 ms / run 1,283.55 ms / run ~2,400 ms (DOM lag) 🚀 13.55x faster
Line + Scatter (1,000 Pts) 121.17 ms / run 117.54 ms / run ~1,100 ms (Canvas) Parity (~1.0x)
Scatter (100,000 Points) 5.51 ms (SIMD Binning) ~350.00 ms ~1,500 ms (DOM lag) 🚀 63.5x faster
Scatter (1,000,000 Points) 25.31 ms ~4,200.00 ms Crash / OOM (Browser) 🚀 166.0x faster
Hot-Path Memory Allocation 0 Bytes (Zero-GC Hot Loop) ~450 MB RAM ~1.2 GB RAM 🛡️ Zero-GC Verified
Interactive HTML Size ~11.44 KB Not supported 3.8 MB – 12 MB 📦 332x lighter

2. Test Suite Verification (tvsrc/test_plot.tkv)

All 9/9 comprehensive test suites pass in pure native TokenVector:

  • test_color: RGBA construction, hex parsing (#RRGGBB), serialization.
  • test_colormap: Viridis colormap sampling, interpolation, clamping.
  • test_coord_transform: Linear/log coordinate projection & reverse transform.
  • test_ticks: Linear tick mark distribution & label formatting.
  • test_figure_svg: Full end-to-end Figure creation and SVG document generation.
  • test_bar_chart: Statistical bar plot generation with automated bar width.
  • test_heatmap_chart: 2D Matrix Heatmap with automated Viridis colormapping.
  • test_box_plot: Five-number summary box plot (min, Q1, median, Q3, max) with whiskers.
  • test_interactive_html: Standalone self-contained HTML export with embedded chart card.
> tvsrc/test_plot.exe
ALL_TESTS_PASS (9/9 suites green)

🚀 Quick Start

1. In Native TokenVector (.tkv)

# test_user_plot.tkv
__tkv_import__ = ["tokenvector_plot_all"]

def make_my_chart() -> "str":
    fig = make_figure(6.4, 4.8, 300.0)
    xs = [0.0, 1.0, 2.0, 3.0, 4.0, 5.0]
    ys = [0.0, 1.0, 4.0, 9.0, 16.0, 25.0]
    
    # Line plot
    line = make_line_plot(xs, ys, "Prediction", color_blue(), 2.0)
    axes2d_add_element(fig.axes, line)
    
    # Scatter points
    pts = make_scatter_plot(xs, ys, "Observation", color_red(), 4.0)
    axes2d_add_element(fig.axes, pts)
    
    # Export to SVG or Interactive HTML
    svg_content = figure_to_svg(fig)
    html_content = figure_to_interactive_html(fig)
    return svg_content

2. In C# (.NET 8/9 with TokenVector.Plot.dll)

using System;
using TokenVector.Plot;

// Create figure and render SVG
var fig = TKVApp.make_figure(6.4, 4.8, 300.0);
var xs = new double[] { 0.0, 1.0, 2.0, 3.0, 4.0 };
var ys = new double[] { 0.0, 1.0, 4.0, 9.0, 16.0 };

var line = TKVApp.make_line_plot(xs, ys, "Growth", TKVApp.color_blue(), 2.0);
TKVApp.axes2d_add_element(fig.axes, line);

string svg = TKVApp.figure_to_svg(fig);
System.IO.File.WriteAllText("plot.svg", svg);

📜 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.
  • net8.0

    • No dependencies.

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

1.0.1: Native TokenVector language (tkv) release. Features 100% pure TokenVector graphics engine: Line, Scatter, Bar Histogram, 2D Matrix Heatmap (Viridis), BoxPlot (five-number summary), Auto-Legend, and Standalone Interactive HTML cards. Full empirical competitor benchmarks against Matplotlib/Plotly, official logo integration.