Scales
bqscales.Scale
Bases: Widget
The base scale class.
Scale objects represent a mapping between data (the domain) and a visual quantity (The range).
ATTRIBUTE | DESCRIPTION |
---|---|
scale_types |
A registry of existing scale types.
TYPE:
|
domain_class |
traitlet type used to validate values in of the domain of the scale.
TYPE:
|
reverse |
whether the scale should be reversed.
TYPE:
|
allow_padding |
indicates whether figures are allowed to add data padding to this scale or not.
TYPE:
|
precedence |
attribute used to determine which scale takes precedence in cases when two or more scales have the same rtype and dtype.
TYPE:
|
bqscales.LinearScale
Bases: Scale
A linear scale.
An affine mapping from a numerical domain to a numerical range.
ATTRIBUTE | DESCRIPTION |
---|---|
min |
if not None, min is the minimal value of the domain
TYPE:
|
max |
if not None, max is the maximal value of the domain
TYPE:
|
rtype |
This attribute should not be modified. The range type of a linear scale is numerical.
TYPE:
|
dtype |
the associated data type / domain type
TYPE:
|
precedence |
attribute used to determine which scale takes precedence in cases when two or more scales have the same rtype and dtype. default_value is 2 because for the same range and domain types, LinearScale should take precedence.
TYPE:
|
stabilized |
if set to False, the domain of the scale is tied to the data range if set to True, the domain of the scale is updated only when the data range is beyond certain thresholds, given by the attributes mid_range and min_range.
TYPE:
|
mid_range |
Proportion of the range that is spanned initially. Used only if stabilized is True.
TYPE:
|
min_range |
Minimum proportion of the range that should be spanned by the data. If the data span falls beneath that level, the scale is reset. min_range must be <= mid_range. Used only if stabilized is True.
TYPE:
|
bqscales.LogScale
Bases: Scale
A log scale.
A logarithmic mapping from a numerical domain to a numerical range.
ATTRIBUTE | DESCRIPTION |
---|---|
min |
if not None, min is the minimal value of the domain
TYPE:
|
max |
if not None, max is the maximal value of the domain
TYPE:
|
rtype |
This attribute should not be modified by the user. The range type of a linear scale is numerical.
TYPE:
|
dtype |
the associated data type / domain type
TYPE:
|
bqscales.DateScale
Bases: Scale
A date scale, with customizable formatting.
An affine mapping from dates to a numerical range.
ATTRIBUTE | DESCRIPTION |
---|---|
min |
if not None, min is the minimal value of the domain
TYPE:
|
max |
if not None, max is the maximal value of the domain
TYPE:
|
domain_class |
traitlet type used to validate values in of the domain of the scale.
TYPE:
|
rtype |
This attribute should not be modified by the user. The range type of a linear scale is numerical.
TYPE:
|
dtype |
the associated data type / domain type
TYPE:
|
bqscales.OrdinalScale
Bases: Scale
An ordinal scale.
A mapping from a discrete set of values to a numerical range.
ATTRIBUTE | DESCRIPTION |
---|---|
domain |
The discrete values mapped by the ordinal scale
TYPE:
|
rtype |
This attribute should not be modified by the user. The range type of a linear scale is numerical.
TYPE:
|
dtype |
the associated data type / domain type
TYPE:
|
bqscales.ColorScale
Bases: Scale
A color scale.
A mapping from numbers to colors. The relation is affine by part.
ATTRIBUTE | DESCRIPTION |
---|---|
scale_type |
scale type
TYPE:
|
colors |
list of colors
TYPE:
|
min |
if not None, min is the minimal value of the domain
TYPE:
|
max |
if not None, max is the maximal value of the domain
TYPE:
|
mid |
if not None, mid is the value corresponding to the mid color.
TYPE:
|
scheme |
Colorbrewer color scheme of the color scale.
TYPE:
|
extrapolation |
How to extrapolate values outside the [min, max] domain.
TYPE:
|
rtype |
The range type of a color scale is 'Color'. This should not be modified.
TYPE:
|
dtype |
the associated data type / domain type
TYPE:
|
bqscales.DateColorScale
Bases: ColorScale
A date color scale.
A mapping from dates to a numerical domain.
ATTRIBUTE | DESCRIPTION |
---|---|
min |
if not None, min is the minimal value of the domain
TYPE:
|
max |
if not None, max is the maximal value of the domain
TYPE:
|
mid |
if not None, mid is the value corresponding to the mid color.
TYPE:
|
rtype |
This attribute should not be modified by the user. The range type of a color scale is 'Color'.
TYPE:
|
dtype |
the associated data type / domain type
TYPE:
|
bqscales.OrdinalColorScale
Bases: ColorScale
An ordinal color scale.
A mapping from a discrete set of values to colors.
ATTRIBUTE | DESCRIPTION |
---|---|
domain |
The discrete values mapped by the ordinal scales.
TYPE:
|
rtype |
This attribute should not be modified by the user. The range type of a color scale is 'color'.
TYPE:
|
dtype |
the associated data type / domain type
TYPE:
|
bqscales.GeoScale
Bases: Scale
The base projection scale class for Map marks.
The GeoScale represents a mapping between topographic data and a 2d visual representation.
bqscales.Orthographic
Bases: GeoScale
A perspective projection that depicts a hemisphere as it appears from outer space.
The projection is neither equal-area nor conformal.
ATTRIBUTE | DESCRIPTION |
---|---|
scale_factor |
Specifies the scale value for the projection
TYPE:
|
center |
Specifies the longitude and latitude where the map is centered.
TYPE:
|
rotate |
Degree of rotation in each axis.
TYPE:
|
clip_angle |
Specifies the clipping circle radius to the specified angle in degrees.
TYPE:
|
precision |
Specifies the threshold for the projections adaptive resampling to the specified value in pixels.
TYPE:
|
bqscales.Mercator
Bases: GeoScale
A geographical projection scale commonly used for world maps.
The Mercator projection is a cylindrical map projection which ensures that any course of constant bearing is a straight line.
ATTRIBUTE | DESCRIPTION |
---|---|
scale_factor |
Specifies the scale value for the projection
TYPE:
|
center |
Specifies the longitude and latitude where the map is centered.
TYPE:
|
rotate |
Degree of rotation in each axis.
TYPE:
|
rtype |
This attribute should not be modified. The range type of a geo scale is a tuple.
TYPE:
|
dtype |
the associated data type / domain type
TYPE:
|
bqscales.Albers
Bases: GeoScale
A geographical scale which is an alias for a conic equal area projection.
The Albers projection is a conic equal area map. It does not preserve scale or shape, though it is recommended for chloropleths since it preserves the relative areas of geographic features. Default values are US-centric.
ATTRIBUTE | DESCRIPTION |
---|---|
scale_factor |
Specifies the scale value for the projection
TYPE:
|
rotate |
Degree of rotation in each axis.
TYPE:
|
parallels |
Sets the two parallels for the conic projection.
TYPE:
|
center |
Specifies the longitude and latitude where the map is centered.
TYPE:
|
precision |
Specifies the threshold for the projections adaptive resampling to the specified value in pixels.
TYPE:
|
rtype |
This attribute should not be modified. The range type of a geo scale is a tuple.
TYPE:
|
dtype |
the associated data type / domain type
TYPE:
|
bqscales.AlbersUSA
Bases: GeoScale
A composite projection of four Albers projections meant specifically for the United States.
ATTRIBUTE | DESCRIPTION |
---|---|
scale_factor |
Specifies the scale value for the projection
TYPE:
|
translate |
TYPE:
|
rtype |
This attribute should not be modified. The range type of a geo scale is a tuple.
TYPE:
|
dtype |
the associated data type / domain type
TYPE:
|
bqscales.Gnomonic
Bases: GeoScale
A perspective projection which displays great circles as straight lines.
The projection is neither equal-area nor conformal.
ATTRIBUTE | DESCRIPTION |
---|---|
scale_factor |
Specifies the scale value for the projection
TYPE:
|
center |
Specifies the longitude and latitude where the map is centered.
TYPE:
|
precision |
Specifies the threshold for the projections adaptive resampling to the specified value in pixels.
TYPE:
|
clip_angle |
Specifies the clipping circle radius to the specified angle in degrees.
TYPE:
|
bqscales.Stereographic
Bases: GeoScale
A perspective projection that uses a bijective and smooth map at every point except the projection point.
The projection is not an equal-area projection but it is conformal.
ATTRIBUTE | DESCRIPTION |
---|---|
scale_factor |
Specifies the scale value for the projection
TYPE:
|
rotate |
Degree of rotation in each axis.
TYPE:
|
center |
Specifies the longitude and latitude where the map is centered.
TYPE:
|
precision |
Specifies the threshold for the projections adaptive resampling to the specified value in pixels.
TYPE:
|
clip_angle |
Specifies the clipping circle radius to the specified angle in degrees.
TYPE:
|
bqscales.EquiRectangular
Bases: GeoScale
An elementary projection that uses the identity function.
The projection is neither equal-area nor conformal.
ATTRIBUTE | DESCRIPTION |
---|---|
scale_factor |
Specifies the scale value for the projection
TYPE:
|
center |
Specifies the longitude and latitude where the map is centered.
TYPE:
|