Skip to main content

Interface: ViolinPlotOptions

Defined in: src/mobjects/graphing/ViolinPlot.ts:23

Options for creating a ViolinPlot.

Properties​

axes?​

optional axes: Axes

Defined in: src/mobjects/graphing/ViolinPlot.ts:41

An existing Axes to draw onto. When omitted, one is built from the data.


axisColor?​

optional axisColor: string

Defined in: src/mobjects/graphing/ViolinPlot.ts:47

Color for the axes when auto-building. Default: '#ffffff'


bandwidth?​

optional bandwidth: number

Defined in: src/mobjects/graphing/ViolinPlot.ts:27

KDE bandwidth. Default: Silverman's rule of thumb per group.


colors?​

optional colors: string | string[]

Defined in: src/mobjects/graphing/ViolinPlot.ts:31

Violin color, or a per-group color array. Default: Manim color palette


data​

data: number[] | number[][]

Defined in: src/mobjects/graphing/ViolinPlot.ts:25

One data group (number[]) or several groups (number[][]).


fillOpacity?​

optional fillOpacity: number

Defined in: src/mobjects/graphing/ViolinPlot.ts:33

Fill opacity for the violins. Default: 0.5


orientation?​

optional orientation: PlotOrientation

Defined in: src/mobjects/graphing/ViolinPlot.ts:29

Lay violins along the x-axis ('vertical') or y-axis ('horizontal'). Default: 'vertical'


resolution?​

optional resolution: number

Defined in: src/mobjects/graphing/ViolinPlot.ts:37

Number of KDE samples along the value axis per group. Default: 48


strokeWidth?​

optional strokeWidth: number

Defined in: src/mobjects/graphing/ViolinPlot.ts:35

Stroke width for the violin outline. Default: 2


widthScale?​

optional widthScale: number

Defined in: src/mobjects/graphing/ViolinPlot.ts:39

Maximum half-width of a violin in category units. Default: 0.4


xLength?​

optional xLength: number

Defined in: src/mobjects/graphing/ViolinPlot.ts:43

Visual length of the x-axis when auto-building axes. Default: 8


yLength?​

optional yLength: number

Defined in: src/mobjects/graphing/ViolinPlot.ts:45

Visual length of the y-axis when auto-building axes. Default: 6