SampleDotPlot

class SampleDotPlot(data: DoubleArray, binWidth: Double = defaultDotBinWidth(data), variableName: String = "observed value") : BasePlot(source)

Every observation, as a dot.

The sample before any model touches it. Worth drawing because the smoothed density that follows is persuasive in a way the raw sample is not: a reader shown three humps in a kernel estimate may take three components as evident, and the dots often show that they are not.

It carries no interpretation of its own, deliberately. What the dots mean is the analyst's reading, and a caption asserting how many clusters are visible would be putting a conclusion on a figure whose whole purpose is to let the reader form one.

Parameters

data

the sample

binWidth

the dot bin width, defaulting to a hundredth of the range

variableName

what the observations measure, for the axis label

Constructors

Link copied to clipboard
constructor(data: DoubleArray, binWidth: Double = defaultDotBinWidth(data), variableName: String = "observed value")

Properties

Link copied to clipboard

An optional caption drawn on the figure. Empty by default: the plot library does not wrap one, so a long caption runs off the canvas, and both destinations for this figure already carry a caption outside the image.

Functions

Link copied to clipboard
open override fun buildPlot(): Plot

Builds a new instance of a Lets-Plot representation of the plot