altair.BinParams#

class altair.BinParams(anchor=Undefined, base=Undefined, binned=Undefined, divide=Undefined, extent=Undefined, maxbins=Undefined, minstep=Undefined, nice=Undefined, step=Undefined, steps=Undefined, **kwds)#

BinParams schema wrapper

Mapping(required=[]) Binning properties or boolean flag for determining whether to bin data or not.

Attributes
anchorfloat

A value in the binned domain at which to anchor the bins, shifting the bin boundaries if necessary to ensure that a boundary aligns with the anchor value.

Default value: the minimum bin extent value

basefloat

The number base to use for automatic bin determination (default is base 10).

Default value: 10

binnedboolean

When set to true, Vega-Lite treats the input data as already binned.

divideList(float)

Scale factors indicating allowable subdivisions. The default value is [5, 2], which indicates that for base 10 numbers (the default base), the method may consider dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the given constraints.

Default value: [5, 2]

extentBinExtent

A two-element ( [min, max] ) array indicating the range of desired bin values.

maxbinsfloat

Maximum number of bins.

Default value: 6 for row, column and shape channels; 10 for other channels

minstepfloat

A minimum allowable step size (particularly useful for integer values).

niceboolean

If true, attempts to make the bin boundaries use human-friendly boundaries, such as multiples of ten.

Default value: true

stepfloat

An exact step size to use between bins.

Note: If provided, options such as maxbins will be ignored.

stepsList(float)

An array of allowable step sizes to choose from.

__init__(anchor=Undefined, base=Undefined, binned=Undefined, divide=Undefined, extent=Undefined, maxbins=Undefined, minstep=Undefined, nice=Undefined, step=Undefined, steps=Undefined, **kwds)#

Methods

__init__([anchor, base, binned, divide, ...])

copy([deep, ignore])

Return a copy of the object

from_dict(dct[, validate, _wrapper_classes])

Construct class from a dictionary representation

from_json(json_string[, validate])

Instantiate the object from a valid JSON string

resolve_references([schema])

Resolve references in the context of this object's schema or root schema.

to_dict([validate, ignore, context])

Return a dictionary representation of the object

to_json([validate, ignore, context, indent, ...])

Emit the JSON representation for this object as a string.

validate(instance[, schema])

Validate the instance against the class schema in the context of the rootschema.

validate_property(name, value[, schema])

Validate a property against property schema in the context of the rootschema