Luminy 1.0.5

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

Luminy 🌟

Elegant SVG math plotting and scientific HTML reports for .NET — zero external dependencies.

NuGet License .NET

Pure Vector Scientific Visualization — Generate crisp SVG charts and complete HTML research reports with modern, idiomatic C#.

Luminy is a lightweight, standalone .NET library designed for generating high-quality scientific plots, data visualizations, and automated research reports. Built from the ground up for simplicity, performance, and clean ergonomics, Luminy produces vector graphics that remain perfectly sharp at any zoom level, without relying on bulky external graphic packages or native wrapper runtimes.


🚀 Why Luminy?

  • 📦 Zero Dependencies: Pure managed C# (.NET 9). No SkiaSharp, no System.Drawing, no C++ native bridges. Just reference the package and run anywhere.
  • 🖼️ Pure Vector SVGs: Output clean, responsive SVG markup ready for embedding into HTML dashboards, web applications, or scientific papers.
  • 📈 Scientific First: Built-in linear and logarithmic scales, "nice" tick calculation, multi-series auto-coloring, and statistical summaries.
  • ✨ Idiomatic C#: Immutable records, non-destructive mutation (with), primary constructors, and fluent document builders.
  • 📑 Integrated HTML Reports: Directly generate publication-ready HTML documents with structured headings, paragraphs, formatted tables, code blocks, and responsive chart grids.
  • ⚡ High-Performance Tensor Imaging: Zero-dependency 8-bit indexed PNG encoder (LUT256) and unmanaged cache-aligned buffers (BitmapBuffer) for ultra-compact AI heatmaps.
  • 🐧 100% Cross-Platform: Runs natively on Linux, macOS, and Windows with zero configuration.

🧠 AI Friendly!

Check our short and sweet skill files designed for LLMs, coding agents, and quick developer reference:


💡 Quick Start

1. Create a Simple SVG Plot

using Luminy.Model;
using Luminy.Builders;

var luminy = new LuminyBuilder { Width = 700, Height = 450, ShowGrid = true };

float[] x = [1f, 2f, 3f, 4f, 5f];
float[] y = [10f, 25f, 18f, 32f, 28f];

var display = luminy.Display(
    luminy.Line(x, y, label: "Sample Trend", color: new Color(0.2f, 0.5f, 0.9f), strokeWidth: 2)
) with {
    Title = "Sample Data Trend",
    XLabel = "Time (s)",
    YLabel = "Value (Units)",
    ShowGrid = true
};

// Generate pure SVG string
string svg = display.ToSvg();

2. Generate a Complete HTML Scientific Report

using Luminy.Model;
using Luminy.Builders;

var luminy = new LuminyBuilder { Width = 800, Height = 500, ShowGrid = true };

// Generate data
float[] x = Enumerable.Range(0, 100).Select(i => i * 0.1f).ToArray();
float[] sinY = x.Select(v => MathF.Sin(v)).ToArray();
float[] cosY = x.Select(v => MathF.Cos(v)).ToArray();

// Compose multi-series visualization
var display = luminy.Display(
    luminy.Line(x, sinY, label: "Sin(x)"),
    luminy.Line(x, cosY, label: "Cos(x)")
) with {
    Title = "Trigonometric Signals",
    XLabel = "Time (s)",
    YLabel = "Amplitude",
    LegendPosition = LegendPosition.TopRight
};

// Build the HTML report with embedded charts
string outputDir = "./reports";

new ReportBuilder(outputDir, "experiment_report.html")
    .AddTitle("Harmonic Signal Analysis")
    .AddSection("Visual Spectrum")
    .AddParagraph("The following chart illustrates the phase relationship between sine and cosine signals.")
    .AddChart(display, "Figure 1: Trigonometric Comparison")
    .AddSection("Key Metrics")
    .AddTable(new[,] {
        { "Metric", "Value" },
        { "Samples", x.Length.ToString() },
        { "Phase Offset", "π / 2" }
    })
    .Build();

📊 Supported Visualizations

Plot Type Description Builder Method
LinePlot Classic continuous curves, signals, and multi-harmonic plots luminy.Line(x, y, label)
PointPlot Scatter plots with automatic filtering of non-finite values (NaN / Inf) luminy.Points(x, y, label)
BarChart Discrete category comparisons with automatic spacing calculation luminy.Bars(heights, label)
HistogramPlot Frequency distribution analysis with custom binning luminy.Histogram(data, binCount, label)
MatrixPlot 2D color heatmaps with smooth gradient interpolation luminy.Matrix(data2D, label)
BoxPlot Tukey-style statistical box & whiskers with automatic outlier detection luminy.Box(data, x, label)
DonutPlot Circular donut or pie charts with optional inside values and slice labels luminy.Donut(values, labels) or luminy.DonutDisplay(values, labels)

🎯 Advanced Features

Logarithmic & Linear Scales

Easily configure logarithmic scales independently on either axis:

var display = luminy.Display(spectrumPlot) with {
    XScaleType = ScaleType.Logarithmic,
    YScaleType = ScaleType.Linear
};

Axes Styles

Select the framing mode that fits your context:

  • AxesStyle.Frame (default): Boxed frame ideal for scientific papers and dashboards.
  • AxesStyle.Normal: Traditional Cartesian axes crossing at $(0,0)$.
  • AxesStyle.Boxed: Frame with tick marks distributed on all bounding sides.
  • AxesStyle.None: Frameless display for sparklines and minimal badges.

Responsive Multi-Chart Grids

Embed several charts side-by-side in HTML reports with responsive flex wrapping:

new ReportBuilder(outputDir, "dashboard.html")
    .AddChart(new Chart(outputDir, plotA, plotB, plotC) { Columns = 3 })
    .Build();

🛠 Installation

.NET CLI

dotnet add package Luminy

Package Manager

Install-Package Luminy

Project Reference

<PackageReference Include="Luminy" Version="1.0.0" />

🔧 Requirements

  • .NET 9.0 SDK or later
  • Cross-platform: Linux, Windows, macOS

🤝 Collaboration

This project was developed through human-AI collaboration:

  • Project Lead & Architect: Samuel Alexandre Vidal
  • AI Collaborators:
    • DeepSeek V3.1
    • Gemini 3.5
    • Gemini 3.8
    • GLM 5

The development process featured continuous collaboration between human vision and multiple cutting-edge AI systems, each contributing unique strengths to create a production-quality library.


📄 License

MIT License - see LICENSE.txt for details.


🚀 Getting Involved

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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 (2)

Showing the top 2 NuGet packages that depend on Luminy:

Package Downloads
Luminy.Wpf

Enterprise-grade retained-mode WPF plotting controls for .NET 9 — DirectX hardware-accelerated vector graphics.

Luminy.Wpf.Demo

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.8 122 10/28/2026
1.0.7 117 10/25/2026
1.0.6 102 10/25/2026
1.0.5 104 10/25/2026
1.0.4 96 10/25/2026
1.0.3 112 10/9/2026
1.0.2 106 10/9/2026
1.0.1 109 10/8/2026
1.0.0 111 10/8/2026

First Release.