Skip to main content

Interface: HistogramOptions

Defined in: src/mobjects/graphing/Histogram.ts:9

Options for creating a Histogram.

Properties​

axes?​

optional axes: Axes

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

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


axisColor?​

optional axisColor: string

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

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


binEdges?​

optional binEdges: number[]

Defined in: src/mobjects/graphing/Histogram.ts:15

Explicit bin edges (length n+1 for n bins). Overrides bins.


bins?​

optional bins: number

Defined in: src/mobjects/graphing/Histogram.ts:13

Number of equal-width bins. Ignored when binEdges is given. Default: 10


color?​

optional color: string

Defined in: src/mobjects/graphing/Histogram.ts:21

Fill color for the bars. Default: Manim's blue


data​

data: number[]

Defined in: src/mobjects/graphing/Histogram.ts:11

The raw data values to bin.


density?​

optional density: boolean

Defined in: src/mobjects/graphing/Histogram.ts:17

Plot bar height as probability density instead of count. Default: false


fillOpacity?​

optional fillOpacity: number

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

Fill opacity for the bars. Default: 0.75


normalize?​

optional normalize: boolean

Defined in: src/mobjects/graphing/Histogram.ts:19

Plot bar height as relative frequency (count / N). Ignored if density. Default: false


strokeWidth?​

optional strokeWidth: number

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

Stroke width for the bar outlines. Default: 1


xLength?​

optional xLength: number

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

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


yLength?​

optional yLength: number

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

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