OptunaSharp.Visualization.Plotly 1.0.0

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

OptunaSharp.Visualization.Plotly

The plotly visualization backend for OptunaSharp — a raw-C# port of optuna.visualization (the 12 plot_* functions) built on Plotly.NET, over OptunaSharp's Phase 3.1 visualization data layer.

Figures are plotly.js figures whose spec matches live Optuna's figure.to_dict(), so what you see is what Optuna draws. Pure managed — Plotly.NET pulls only managed dependencies (no native binaries).

using OptunaSharp;
using OptunaSharp.Visualization.Plotly;
using Plotly.NET.CSharp;   // .Show() / .SaveHtml()

var study = Optuna.CreateStudy();
study.Optimize(t => { var x = t.SuggestFloat("x", -10, 10); return (x - 2) * (x - 2); }, nTrials: 50);

PlotlyVisualization.PlotOptimizationHistory(study).SaveHtml("history.html");
PlotlyVisualization.PlotOptimizationHistory(study).Show();   // opens a browser

Customizing (golden-standard Plotly.NET config)

Every Plot* returns a Plotly.NET GenericChart, so configure it the idiomatic way. Most of the fluent surface ships in Plotly.NET core (using Plotly.NET;) — .WithConfig, .WithLayout, .WithSize, .WithTitle, … This package adds the two things it's missing: .WithDisplayOptions and .WithCustomization (a one-call bundle), plus a customization overload on each Plot*:

using Plotly.NET;                       // .WithConfig / .WithSize / .WithLayout (Plotly.NET core)
using OptunaSharp.Visualization.Plotly; // .WithDisplayOptions / .WithCustomization + the overloads

var config = new Config();  config.SetValue("staticPlot", true);
var layout = new Layout();  layout.SetValue("width", 900);   // merged onto Optuna's title/axes

// fluent:
PlotlyVisualization.PlotOptimizationHistory(study).WithConfig(config).WithSize(900, 500);

// or the one-shot overload:
PlotlyVisualization.PlotOptimizationHistory(
    study, new PlotlyChartCustomization { Config = config, Layout = layout });

Status

Complete — all 12 optuna.visualization plot functions are ported (each with a golden-standard Plotly.NET customization overload) and byte-exact vs live Optuna:

PlotOptimizationHistory · PlotEdf · PlotIntermediateValues · PlotHypervolumeHistory · PlotTimeline · PlotParamImportances · PlotSlice · PlotTerminatorImprovement · PlotContour · PlotRank · PlotParallelCoordinate · PlotParetoFront — plus IsAvailable.

Part of the SciSharp STACK.

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 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. 
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.0 38 11/8/2026