Creating a box plot with ScottPlot
The first data visualization we’ll create will be a box plot. Box plots show you the same information we just saw with descriptive statistics, but in a graphical way. This helps you look at a single chart to understand how values are distributed in your dataset.
There are several different options for charting in .NET that support Polyglot Notebooks, but we’ll start with the ScottPlot
library because it’s going to make it most apparent how our descriptive statistics translate into a visual display.
We’ll start by installing ScottPlot and Plotly.NET, which we’ll use later this chapter:
#r "nuget:ScottPlot,5.0.37" #r "nuget:Plotly.NET,5.0.0" #r "nuget:Plotly.NET.Interactive,5.0.0"
Next, we’ll open the ScottPlot namespace and register a custom formatter that renders ScottPlot plots graphically in our notebook. We’ll talk more about these formatters near the end...