Luminy 1.0.1
See the version list below for details.
dotnet add package Luminy --version 1.0.1
NuGet\Install-Package Luminy -Version 1.0.1
<PackageReference Include="Luminy" Version="1.0.1" />
<PackageVersion Include="Luminy" Version="1.0.1" />
<PackageReference Include="Luminy" />
paket add Luminy --version 1.0.1
#r "nuget: Luminy, 1.0.1"
#:package Luminy@1.0.1
#addin nuget:?package=Luminy&version=1.0.1
#tool nuget:?package=Luminy&version=1.0.1
Luminy 🌟
Elegant SVG math plotting and scientific HTML reports for .NET — zero external dependencies.
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.
- 🐧 100% Cross-Platform: Runs natively on Linux, macOS, and Windows with zero configuration.
💡 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) |
🎯 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
- Found a bug? Open an issue
- Have an idea or feedback? Start a discussion
- Want to contribute? Pull requests are welcome!
| Product | Versions 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. |
-
net9.0
- System.Collections.Immutable (>= 10.0.7)
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.
First Release.