fslaborg / fslaborg/FsLab

Generic extension to visualize FSharp.Stats distributions with Plotly.NET

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Difficulty: Intermediate FsLab Hackathon 2023 Status: Available
Dominant language
F#
Stars
35
Forks
3
PR merge metrics
No merged PRs in 30d

Description

### Description

This is a 'glue' function that reduces friction between usage of FSharp.Stats and Plotly.NET.

When working with distributions, it is quite common to visualize either properties (e.g. PDF, CDF) or a sample. This would ideally work in a smooth pipeline, where a `Distribution.toChart` function transforms the input distribution to a chart, which can then further be used in the pipeline for additional styling, etc. before display

(the following is just a rough draft, might be not directly possible to implement it like this)

```fsharp
Distributions.Continuous.Normal.Init 500. 20.
|> Distribution.toPDFChart(
Range = [400. .. 600.]
)
|> Chart.withXAxisStyle(...)
|> Chart.withYAxisStyle(...)
```

![Image](https://github.com/fslaborg/FsLab/assets/21338071/03baf0a6-1fcf-4b84-a1ee-c062aa9b8df7)

### Pointers

- The FSharp.Stats documentation has many examples where plots are created for distributions manually.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.