### Quick Start: Plotly.NET in Polyglot Notebooks Source: https://github.com/plotly/plotly.net/blob/dev/README.md This snippet provides a quick start guide for using Plotly.NET in .NET polyglot notebooks. It demonstrates how to reference the necessary interactive and language-specific packages and create a basic point chart in both F# and C#. ```F# #r "nuget: Plotly.NET.Interactive" open Plotly.NET Chart.Point( x = [0 .. 10], y = [0 .. 10] ) |> Chart.withTitle "Hello World!" ``` ```C# #r "nuget: Plotly.NET.Interactive" #r "nuget: Plotly.NET.CSharp" using Plotly.NET.CSharp; Chart.Point( x: Enumerable.Range(0,11), y: Enumerable.Range(0,11) ) ``` -------------------------------- ### Pie Chart Source: https://github.com/plotly/plotly.net/blob/dev/tests/ExtensionLibsTests/ImageExportTests/data/winTestBase64PNG.txt Example of creating a pie chart to visualize proportions. Requires the Plotly.NET.Interactive package. ```C# using Plotly.NET; using Plotly.NET.Layout; var trace1 = Pie.newTrace(new[] { "Team A", "Team B", "Team C" }, new[] { 45.0, 25.0, 30.0 }); var layout = Layout.init(Title: "Team Distribution Pie Chart"); var figure = Figure.init(new[] { trace1 }, layout); // To display the plot: // figure.show(); ``` -------------------------------- ### Run Plotly.NET tests using build scripts Source: https://github.com/plotly/plotly.net/blob/dev/tests/README.md This snippet demonstrates how to execute various test suites for Plotly.NET from the command line using the platform-specific build scripts. It shows examples for running all tests or a subset of core tests, providing a quick way to initiate testing without a full IDE. ```Batch build.cmd runTestsAll ``` ```Bash build.sh runTestsCore ``` -------------------------------- ### Quick Start: Plotly.NET in F# Script (.fsx) Source: https://github.com/plotly/plotly.net/blob/dev/README.md This snippet demonstrates how to set up and display a Plotly.NET chart within an F# script (.fsx file). It includes referencing the core `Plotly.NET` package and using the `Chart.show` function to render the chart in a browser. ```F# #r "nuget: Plotly.NET" open Plotly.NET Chart.Point( x = [0 .. 10], y = [0 .. 10] ) |> Chart.withTitle "Hello World!" |> Chart.show ``` -------------------------------- ### Creating a Basic Plotly.NET Chart with Description in F# Source: https://github.com/plotly/plotly.net/blob/dev/src/Plotly.NET.Interactive/TestNotebook.ipynb This example illustrates how to create a simple point chart using the Plotly.NET library in F#. It also shows how to add a custom HTML description to the chart using Giraffe.ViewEngine, demonstrating basic chart customization. ```fsharp open Plotly.NET open Giraffe.ViewEngine Chart.Point([1,2; 3,4]) |> Chart.withDescription [ h1 [] [str "lel!"] ] ``` -------------------------------- ### F# Plotly.NET Setup and Dependency References Source: https://github.com/plotly/plotly.net/blob/dev/docs/404.fsx.txt This snippet includes F# directives (`#r`) to reference necessary NuGet packages (Deedle, FsHttp, Newtonsoft.JSON, DynamicObj, Giraffe.ViewEngine.StrongName) and the local Plotly.NET assembly for development or scripting environments. It also sets the default display options to avoid Plotly.js reference and opens the `Plotly.NET` namespace. Conditional references for Jupyter notebooks are also included. ```F# #r "nuget: Deedle" #r "nuget: FsHttp" #r "nuget: Newtonsoft.JSON, 13.0.1" #r "nuget: DynamicObj, 2.0.0" #r "nuget: Giraffe.ViewEngine.StrongName, 2.0.0-alpha1" #r "../src/Plotly.NET/bin/Release/netstandard2.0/Plotly.NET.dll" Plotly.NET.Defaults.DefaultDisplayOptions <- Plotly.NET.DisplayOptions.init (PlotlyJSReference = Plotly.NET.PlotlyJSReference.NoReference) open Plotly.NET #if IPYNB #r "nuget: Plotly.NET, {{fsdocs-package-version}}" #r "nuget: Plotly.NET.Interactive, {{fsdocs-package-version}}" #endif // IPYNB ``` -------------------------------- ### Referencing Local Plotly.NET NuGet Package in F# Script Source: https://github.com/plotly/plotly.net/blob/dev/tests/InteractiveTests/TestNotebook.ipynb This snippet demonstrates how to reference a locally built Plotly.NET NuGet package within an F# script. It highlights the necessity of using absolute paths for local packages and specifies the development version '0.0.1-dev'. This setup is crucial for testing local changes before official release. ```F# Script // be advised, that you always should set absolute paths for local nuget packages - change this to reflect your own setup #i "nuget: C:/Users/schne/source/repos/plotly/Plotly.NET/tests/Interactivetests/pkg" #r "nuget: Plotly.NET, 0.0.1-dev" ``` -------------------------------- ### Define 2D Data for Plotly.NET Heatmap in F# Source: https://github.com/plotly/plotly.net/blob/dev/docs/404.fsx.txt This F# snippet defines a 2D list of integers named `data`. This matrix represents a simple pattern and is intended to be used as the `zData` input for a Plotly.NET heatmap visualization. ```F# let data = [ [0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 0; 0; 0; 4; 0; 4; 4; 4; 4; 0; 0; 0; 0; 4; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 0; 0; 4; 4; 0; 4; 0; 0; 4; 0; 0; 0; 4; 4; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 0; 4; 0; 4; 0; 4; 0; 0; 4; 0; 0; 4; 0; 4; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 4; 4; 4; 4; 0; 4; 0; 0; 4; 0; 4; 4; 4; 4; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 0; 0; 0; 4; 0; 4; 0; 0; 4; 0; 0; 0; 0; 4; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 0; 0; 0; 4; 0; 4; 4; 4; 4; 0; 0; 0; 0; 4; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 4; 4; 4; 4; 0; 4; 4; 4; 4; 0; 4; 4; 4; 4; 0; 4; 4; 4; 0; 0; 0; 0; 0; 0;] [0; 4; 0; 0; 4; 0; 4; 0; 0; 4; 0; 4; 0; 0; 0; 0; 4; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 4; 0; 0; 4; 0; 4; 0; 0; 4; 0; 4; 0; 0; 0; 0; 4; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 4; 4; 4; 4; 0; 4; 4; 4; 4; 0; 4; 0; 4; 4; 0; 4; 4; 4; 0; 0; 0; 0; 0; 0;] [0; 4; 0; 0; 0; 0; 4; 0; 0; 4; 0; 4; 0; 0; 4; 0; 4; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 4; 0; 0; 0; 0; 4; 0; 0; 4; 0; 4; 4; 4; 4; 0; 4; 4; 4; 0; 0; 0; 0; 0; 0;] [0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 4; 0; 0; 4; 0; 4; 4; 4; 4; 0; 4; 4; 4; 4; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 4; 4; 0; 4; 0; 4; 0; 0; 4; 0; 0; 4; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 4; 4; 0; 4; 0; 4; 0; 0; 4; 0; 0; 4; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 4; 0; 4; 4; 0; 4; 0; 0; 4; 0; 0; 4; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 4; 0; 4; 4; 0; 4; 0; 0; 4; 0; 0; 4; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 4; 0; 0; 4; 0; 4; 4; 4; 4; 0; 0; 4; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;] [0; 4; 4; 4; 4; 0; 4; 4; 4; 4; 0; 4; 0; 0; 4; 0; 4; 0; 0; 4; 0; 4; 4; 0; 0;] [0; 4; 0; 0; 0; 0; 4; 0; 0; 4; 0; 4; 0; 0; 4; 0; 4; 4; 0; 4; 0; 4; 0; 4; 0;] [0; 4; 0; 0; 0; 0; 4; 0; 0; 4; 0; 4; 0; 0; 4; 0; 4; 4; 0; 4; 0; 4; 0; 4; 0;] [0; 4; 4; 4; 4; 0; 4; 0; 0; 4; 0; 4; 0; 0; 4; 0; 4; 0; 4; 4; 0; 4; 0; 4; 0;] [0; 4; 0; 0; 0; 0; 4; 0; 0; 4; 0; 4; 0; 0; 4; 0; 4; 0; 4; 4; 0; 4; 0; 4; 0;] [0; 4; 0; 0; 0; 0; 4; 4; 4; 4; 0; 4; 4; 4; ``` -------------------------------- ### Build and Release Plotly.NET Source: https://github.com/plotly/plotly.net/blob/dev/README.md Commands to build, test, pack, and release Plotly.NET. The 'release' and 'prerelease' targets require a 'NUGET_KEY' environment variable. Applicable for both Windows and Linux/macOS. ```Shell # Windows ./build.cmd ./build.cmd release ./build.cmd prerelease ``` ```Shell # Linux/mac build.sh build.sh release build.sh prerelease ``` -------------------------------- ### Creating a Basic Point Chart with Plotly.NET in F# Source: https://github.com/plotly/plotly.net/blob/dev/tests/InteractiveTests/TestNotebook.ipynb This F# code snippet illustrates the creation of a simple 2D point chart using the Plotly.NET library. It also shows how to add an HTML description to the chart using Giraffe.ViewEngine, demonstrating integration with other F# web development tools for richer visualizations. ```F# open Plotly.NET open Giraffe.ViewEngine Chart.Point([1,2; 3,4]) |> Chart.withDescription [ h1 [] [str "lel!"] ] ``` -------------------------------- ### Bar Chart Source: https://github.com/plotly/plotly.net/blob/dev/tests/ExtensionLibsTests/ImageExportTests/data/winTestBase64PNG.txt Illustrates creating a basic bar chart. Requires the Plotly.NET.Interactive package. ```C# using Plotly.NET; using Plotly.NET.Layout; var trace1 = Bar.newTrace(new[] { "Apples", "Oranges", "Bananas" }, new[] { 20.0, 14.0, 23.0 }); var layout = Layout.init(Title: "Fruit Sales Bar Chart"); var figure = Figure.init(new[] { trace1 }, layout); // To display the plot: // figure.show(); ``` -------------------------------- ### Develop Plotly.NET Documentation Locally Source: https://github.com/plotly/plotly.net/blob/dev/README.md Commands to run a local server with hot reload for developing Plotly.NET documentation. Applicable for both Windows and Linux/macOS. ```Shell # Windows ./build.cmd watchdocs ``` ```Shell # Linux/mac build.sh watchdocs ``` -------------------------------- ### Pie Chart in C# Source: https://github.com/plotly/plotly.net/blob/dev/tests/ExtensionLibsTests/ImageExportTests/data/linuxTestBase64PNG.txt Demonstrates creating a pie chart with Plotly.NET. Pie charts are used to show proportions of a whole. ```C# using Plotly.NET; using Plotly.NET.TraceObjects; var trace1 = new Pie( values: new[] { 450, 400, 300, 350 }, labels: new[] { "Category A", "Category B", "Category C", "Category D" }, type: TraceType.Pie ); var layout = new Layout( title: "Simple Pie Chart" ); var figure = Chart.Combine(new[] { trace1 }, layout); figure.Show(); ``` -------------------------------- ### Basic Scatter Plot Source: https://github.com/plotly/plotly.net/blob/dev/tests/ExtensionLibsTests/ImageExportTests/data/winTestBase64PNG.txt Demonstrates how to create a simple scatter plot using Plotly.NET. Requires the Plotly.NET.Interactive package. ```C# using Plotly.NET; using Plotly.NET.Layout; var trace1 = Scatter.newTrace(new[] { 1.0, 2.0, 3.0, 4.0 }, new[] { 10.0, 15.0, 13.0, 17.0 }); var layout = Layout.init(Title: "Simple Scatter Plot"); var figure = Figure.init(new[] { trace1 }, layout); // To display the plot in a Jupyter Notebook or similar environment: // figure.show(); ``` -------------------------------- ### Initial C# Bindings for Chart Styling and Layouting Source: https://github.com/plotly/plotly.net/blob/dev/src/Plotly.NET.CSharp/RELEASE_NOTES.md Provides initial C# bindings for common chart styling and layout operations, including saving to HTML, showing charts, setting trace info, size, and axis styles, along with grid and combine functionalities. ```APIDOC Extension Methods: SaveHtml Show WithTraceInfo WithSize WithXAxisStyle WithYAxisStyle Chart.Grid Chart.Combine ``` -------------------------------- ### OpenAIModel Class Initialization API Source: https://github.com/plotly/plotly.net/blob/dev/src/Plotly.NET.Interactive/Untitled-1.html Defines the `OpenAIModel` class constructor, detailing parameters for model name and provider. The `model_name` parameter specifies the OpenAI model to be used, and `provider` defaults to 'openai'. ```APIDOC OpenAIModel: __init__(model_name: str, provider: str = 'openai') model_name: The name of the OpenAI model to use provider: The provider to use (defaults to 'openai') ``` -------------------------------- ### Basic Scatter Plot in C# Source: https://github.com/plotly/plotly.net/blob/dev/tests/ExtensionLibsTests/ImageExportTests/data/linuxTestBase64PNG.txt Demonstrates how to create a simple scatter plot using Plotly.NET in C#. This involves defining data points and specifying plot type. ```C# using Plotly.NET; using Plotly.NET.TraceObjects; var trace1 = new Scatter( x: new[] { 1, 2, 3, 4 }, y: new[] { 10, 15, 13, 17 }, mode: Mode.Markers ); var layout = new Layout( title: "Simple Scatter Plot" ); var figure = Chart.Combine(new[] { trace1 }, layout); figure.Show(); ``` -------------------------------- ### Line Plot with Customization Source: https://github.com/plotly/plotly.net/blob/dev/tests/ExtensionLibsTests/ImageExportTests/data/winTestBase64PNG.txt Shows how to create a line plot with custom styling, including line color and mode. Requires the Plotly.NET.Interactive package. ```C# using Plotly.NET; using Plotly.NET.Layout; var trace1 = Scatter.newTrace(new[] { 1.0, 2.0, 3.0, 4.0 }, new[] { 10.0, 15.0, 13.0, 17.0 }, Mode: "lines+markers", Line: { Color: "rgb(255, 0, 0)", Width: 2 }); var layout = Layout.init(Title: "Customized Line Plot"); var figure = Figure.init(new[] { trace1 }, layout); // To display the plot: // figure.show(); ``` -------------------------------- ### Import F# Libraries for Plotting and Statistics Source: https://github.com/plotly/plotly.net/blob/dev/publication/example_charts/BoxPlot.ipynb This snippet imports necessary F# libraries: Plotly.NET.Interactive for plotting, FSharp.Stats for statistical distributions, and various modules from Plotly.NET for chart creation and styling. ```F# // Referencing Plotly.NET.Interactive extension #r "nuget: Plotly.NET.Interactive, 3.0.2" // To generate samples from distributions, FSharp.Stats is referenced #r "nuget: FSharp.Stats, 0.4.7" open FSharp.Stats open Plotly.NET open Plotly.NET.StyleParam open Plotly.NET.LayoutObjects open Plotly.NET.TraceObjects ``` -------------------------------- ### Referencing Local Plotly.NET NuGet Packages in F# Source: https://github.com/plotly/plotly.net/blob/dev/src/Plotly.NET.Interactive/TestNotebook.ipynb This snippet demonstrates how to reference locally built Plotly.NET NuGet packages in an F# interactive environment. It highlights the necessity of using absolute paths for local package references to ensure correct resolution. ```fsharp // be advised, that you always should set absolute paths for local nuget packages - change this to reflect your own setup #i "nuget: C:/Users/schne/source/repos/plotly/Plotly.NET/pkg" #r "nuget: Plotly.NET, 0.0.1-dev" #r "nuget: Plotly.NET.Interactive, 0.0.1-dev" ``` -------------------------------- ### APIDOC: Plotly.NET Chart Class Source: https://github.com/plotly/plotly.net/blob/dev/tests/ExtensionLibsTests/ImageExportTests/data/linuxTestBase64PNG.txt Provides an overview of the Chart class in Plotly.NET, which is central to creating and managing plots. ```APIDOC Chart: Combine(traces: IEnumerable, layout: Layout = null, config: Config = null) : GenericChart Combines multiple traces and an optional layout into a single chart. traces: An enumerable collection of ITrace objects. layout: An optional Layout object for chart customization. config: An optional Config object for chart configuration. Show(chart: GenericChart, renderer: Renderer = null) : void Renders and displays the chart. Supports various renderers (e.g., Browser, ImageFile). chart: The GenericChart object to display. renderer: An optional Renderer to specify how the chart should be displayed. ``` -------------------------------- ### Line Plot with Multiple Traces in C# Source: https://github.com/plotly/plotly.net/blob/dev/tests/ExtensionLibsTests/ImageExportTests/data/linuxTestBase64PNG.txt Illustrates creating a line plot with multiple traces using Plotly.NET. This is useful for comparing different datasets on the same graph. ```C# using Plotly.NET; using Plotly.NET.TraceObjects; var trace1 = new Scatter( x: new[] { 1, 2, 3, 4 }, y: new[] { 10, 15, 13, 17 }, mode: Mode.Lines, name: "Trace 1" ); var trace2 = new Scatter( x: new[] { 1, 2, 3, 4 }, y: new[] { 16, 5, 11, 9 }, mode: Mode.Lines, name: "Trace 2" ); var layout = new Layout( title: "Line Plot with Multiple Traces" ); var figure = Chart.Combine(new[] { trace1, trace2 }, layout); figure.Show(); ``` -------------------------------- ### Multiple Traces Source: https://github.com/plotly/plotly.net/blob/dev/tests/ExtensionLibsTests/ImageExportTests/data/winTestBase64PNG.txt Demonstrates how to add multiple traces (datasets) to a single plot. Requires the Plotly.NET.Interactive package. ```C# using Plotly.NET; using Plotly.NET.Layout; var trace1 = Scatter.newTrace(new[] { 1.0, 2.0, 3.0 }, new[] { 10.0, 15.0, 13.0 }, Name: "Trace 1"); var trace2 = Scatter.newTrace(new[] { 1.0, 2.0, 3.0 }, new[] { 12.0, 10.0, 18.0 }, Name: "Trace 2"); var layout = Layout.init(Title: "Plot with Multiple Traces"); var figure = Figure.init(new[] { trace1, trace2 }, layout); // To display the plot: // figure.show(); ``` -------------------------------- ### Plotly.NET API Layer Model Abstractions Source: https://github.com/plotly/plotly.net/blob/dev/RELEASE_NOTES.md Overview of the five main categories of abstractions in Plotly.NET's API layer model, including Trace, Layout, Config, DisplayOptions, and StyleParam. It also details their relationship with *Objects namespaces and the DynamicObj base for custom property assignments. ```APIDOC API Layer Model Abstractions: - Trace: Chart data and type - Layout: Non-data chart styling - Config: Render options - DisplayOptions: HTML display options - StyleParam: DSL for styling options Object Namespaces: - Properties that are objects are in respective `*Objects` namespaces (e.g., `LayoutObjects.Geo`). Customization: - All objects based on `DynamicObj` for dynamic member assignment, allowing manual setting of any Plotly property. ``` -------------------------------- ### Reference Plotly.NET and Deedle NuGet Packages Source: https://github.com/plotly/plotly.net/blob/dev/publication/example_charts/Splom.ipynb This snippet references the necessary Plotly.NET.Interactive and Deedle.Interactive NuGet packages and opens the required namespaces for data visualization and handling in F#. ```F# // Referencing Plotly.NET.Interactive extension #r "nuget: Plotly.NET.Interactive, 3.0.2" // Deedle is required for data handling #r "nuget: Deedle.Interactive, 3.0.0-beta.1" open Plotly.NET open Plotly.NET.StyleParam open Plotly.NET.LayoutObjects open Plotly.NET.TraceObjects open Deedle ``` -------------------------------- ### Add C# Wrapper for Chart.SingleStack Source: https://github.com/plotly/plotly.net/blob/dev/src/Plotly.NET.CSharp/RELEASE_NOTES.md Introduces a C# wrapper for the Chart.SingleStack functionality, enhancing chart generation capabilities in Plotly.NET. ```APIDOC Chart.SingleStack ``` -------------------------------- ### Plotly.NET HTML DSL Integration with Giraffe.ViewEngine Source: https://github.com/plotly/plotly.net/blob/dev/src/Plotly.NET/RELEASE_NOTES.md Notes the adoption of Giraffe.ViewEngine as the new HTML Domain Specific Language (DSL) for Plotly.NET, streamlining HTML generation. ```APIDOC - Use Giraffe.ViewEngine as html dsl ``` -------------------------------- ### Initial C# Bindings for Basic Chart Generation Source: https://github.com/plotly/plotly.net/blob/dev/src/Plotly.NET.CSharp/RELEASE_NOTES.md Introduces initial C# bindings for generating various basic chart types, including 2D (Scatter, Line, Bar), 3D (Scatter3D), Polar (ScatterPolar), Map (ScatterGeo), Ternary (ScatterTernary), Carpet (Carpet), Domain (Pie), and Smith (ScatterSmith) charts. ```APIDOC Chart.Invisible Chart2D: Scatter Point Line Bar Column Chart3D: Scatter3D ChartPolar: ScatterPolar ChartMap: ScatterGeo ChartTernary: ScatterTernary ChartCarpet: Carpet ChartDomain: Pie ChartSmith: ScatterSmith ``` -------------------------------- ### APIDOC: Plotly.NET Layout Object Source: https://github.com/plotly/plotly.net/blob/dev/tests/ExtensionLibsTests/ImageExportTests/data/linuxTestBase64PNG.txt Explains the Layout object for customizing the appearance and behavior of Plotly charts. ```APIDOC Layout: __init__(title: string = null, xaxis: XAxis = null, yaxis: YAxis = null, ...) Initializes a Layout object for chart customization. title: The main title of the chart. xaxis: Configuration for the x-axis. yaxis: Configuration for the y-axis. ``` -------------------------------- ### Plotly.NET Core Functionality Source: https://github.com/plotly/plotly.net/blob/dev/tests/ExtensionLibsTests/ImageExportTests/data/winTestBase64PNG.txt This snippet demonstrates core functionalities of Plotly.NET, including data manipulation and plot generation. It relies on the Plotly.NET library and potentially other .NET data handling packages. ```C# using Plotly.NET; using Plotly.NET.Layout; using Plotly.NET.TraceObjects; // Example usage: var trace1 = new Scatter( x: new[] { 1.0, 2.0, 3.0, 4.0 }, y: new[] { 10.0, 11.0, 12.0, 13.0 }, mode: Mode.markers, marker: new Marker { color = Color.red }) .WithLayout(new Layout( title: "Simple Scatter Plot", xaxis: new XAxis { title = "X-Axis" }, yaxis: new YAxis { title = "Y-Axis" }) ); var figure = new Figure(trace1); // To save or display the figure: // figure.Save("scatter.html"); // figure.Show(); ``` -------------------------------- ### Plotly.NET Chart Creation Methods Source: https://github.com/plotly/plotly.net/blob/dev/RELEASE_NOTES.md Describes the three primary methods for creating charts in Plotly.NET, ranging from the high-level unified Chart API to manual object construction and direct DynamicObj usage for maximum customization. Each method offers increasing levels of control over chart properties. ```APIDOC Chart Creation Methods: 1. Chart API (unified surface): - Chart. (e.g., Chart.Point) for creation from data and specific styling. - Chart.with