Constants Module
datachart.constants
Module containing the constants.
The constants module provides a set of predefined constants used in the package.
These include figure size, format, style, and other figure manipulation values.
| CLASS | DESCRIPTION |
|---|---|
FIG_SIZE |
The predefined figure sizes. |
FIG_FORMAT |
The supported figure formats. |
FONT_STYLE |
The supported font styles. |
FONT_WEIGHT |
The supported font weights. |
LINE_MARKER |
The supported line markers. |
LINE_STYLE |
The supported line styles. |
LINE_DRAW_STYLE |
The supported line draw styles. |
HATCH_STYLE |
The supported hatch styles. |
LEGEND_ALIGN |
The supported legend alignments. |
LEGEND_LOCATION |
The supported legend locations. |
HISTOGRAM_TYPE |
The supported histogram types. |
COLORS |
The predefined colors. |
NORMALIZE |
The supported normalization options. |
ORIENTATION |
The supported orientations. |
VALFMT |
The predefined value formats. |
THEME |
The predefined themes. |
SHOW_GRID |
The supported show grid options. |
SCALE |
The supported scale options. |
ASPECT_RATIO |
The supported aspect ratio options. |
COLORBAR_LOCATION |
The supported colorbar locations. |
FIG_SIZE
The predefined figure sizes.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
DEFAULT |
The default figure size. Equals to
TYPE:
|
A4_PORTRAIT |
The A4 portrait figure size. Equals to
TYPE:
|
A4 |
Alias for
TYPE:
|
A4_LANDSCAPE |
The A4 landscape figure size. Equals to
TYPE:
|
A4_NARROW |
The flat, full-width A4 figure size. Equals to
TYPE:
|
A4_REGULAR |
The regular, full-width A4 figure size. Equals to
TYPE:
|
A4_WIDE |
The tall, full-width A4 figure size. Equals to
TYPE:
|
A4_HALF_PORTRAIT |
The A4 half-width portrait figure size. Equals to
TYPE:
|
A4_HALF_LANDSCAPE |
The A4 half-width landscape figure size. Equals to
TYPE:
|
A4_HALF_NARROW |
The flat, half-width A4 figure size. Equals to
TYPE:
|
A4_HALF_REGULAR |
The regular, half-width A4 figure size. Equals to
TYPE:
|
A4_HALF_WIDE |
The tall, half-width A4 figure size. Equals to
TYPE:
|
LETTER_PORTRAIT |
The US Letter portrait figure size. Equals to
TYPE:
|
LETTER_LANDSCAPE |
The US Letter landscape figure size. Equals to
TYPE:
|
LETTER_NARROW |
The flat, full-width Letter figure size. Equals to
TYPE:
|
LETTER_REGULAR |
The regular, full-width Letter figure size. Equals to
TYPE:
|
LETTER_WIDE |
The tall, full-width Letter figure size. Equals to
TYPE:
|
TALL_NARROW |
The moderately tall, narrow figure size. Equals to
TYPE:
|
TALL_REGULAR |
The regular tall, narrow figure size. Equals to
TYPE:
|
TALL_WIDE |
The very tall, narrow figure size. Equals to
TYPE:
|
SQUARE |
The regular square figure size. Equals to
TYPE:
|
SQUARE_SMALL |
The small square figure size. Equals to
TYPE:
|
SQUARE_LARGE |
The large square figure size. Equals to
TYPE:
|
FIG_FORMAT
The supported figure formats.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
DEFAULT |
The default format. Same as
TYPE:
|
SVG |
The svg format. Equals to
TYPE:
|
PDF |
The pdf format. Equals to
TYPE:
|
PNG |
The png format. Equals to
TYPE:
|
WEBP |
The webp format. Equals to
TYPE:
|
EPS |
The eps format (Encapsulated PostScript). Equals to
TYPE:
|
JPG |
The jpg format. Equals to
TYPE:
|
TIFF |
The tiff format. Equals to
TYPE:
|
FONT_STYLE
The supported font styles.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
DEFAULT |
The default font style. Same as
TYPE:
|
NORMAL |
The normal font style. Equals to
TYPE:
|
ITALIC |
The italic font style. Equals to
TYPE:
|
OBLIQUE |
The oblique font style. Equals to
TYPE:
|
FONT_WEIGHT
The supported font weights.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
DEFAULT |
The default font weight. Same as
TYPE:
|
ULTRA_LIGHT |
The ultra light font weight. Equals to
TYPE:
|
LIGHT |
The light font weight. Equals to
TYPE:
|
NORMAL |
The normal font weight. Equals to
TYPE:
|
MEDIUM |
The medium font weight. Equals to
TYPE:
|
SEMIBOLD |
The semibold font weight. Equals to
TYPE:
|
DEMI_BOLD |
The demibold font weight. Equals to
TYPE:
|
BOLD |
The bold font weight. Equals to
TYPE:
|
EXTRA_BOLD |
The extra bold font weight. Equals to
TYPE:
|
HEAVY |
The heavy font weight. Equals to
TYPE:
|
ULTRA_HEAVY |
The ultra heavy font weight. Equals to
TYPE:
|
BLACK |
The black font weight. Equals to
TYPE:
|
LINE_MARKER
The supported line markers.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
NONE |
No marker. Equals to
TYPE:
|
PIXEL |
The pixel line marker. Equals to
TYPE:
|
POINT |
The point line marker. Equals to
TYPE:
|
CIRCLE |
The circle line marker. Equals to
TYPE:
|
DIAMOND |
The diamond line marker. Equals to
TYPE:
|
THIN_DIAMOND |
The thin diamond line marker. Equals to
TYPE:
|
TRIANGLE |
The triangle (up) line marker. Equals to
TYPE:
|
TRIANGLE_DOWN |
The triangle down line marker. Equals to
TYPE:
|
TRIANGLE_LEFT |
The triangle left line marker. Equals to
TYPE:
|
TRIANGLE_RIGHT |
The triangle right line marker. Equals to
TYPE:
|
SQUARE |
The square line marker. Equals to
TYPE:
|
PENTAGON |
The pentagon line marker. Equals to
TYPE:
|
HEXAGON |
The hexagon line marker. Equals to
TYPE:
|
STAR |
The star line marker. Equals to
TYPE:
|
CROSS |
The cross line marker. Equals to
TYPE:
|
PLUS |
The plus line marker. Equals to
TYPE:
|
VLINE |
The vertical line marker. Equals to
TYPE:
|
HLINE |
The horizontal line marker. Equals to
TYPE:
|
LINE_STYLE
The supported line styles.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
NONE |
No line style. Equals to
TYPE:
|
SOLID |
The solid line style. Equals to
TYPE:
|
DASHED |
The dashed line style. Equals to
TYPE:
|
DASHDOT |
The dashdot line style. Equals to
TYPE:
|
DOTTED |
The dotted line style. Equals to
TYPE:
|
LINE_DRAW_STYLE
The supported line draw styles.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
DEFAULT |
The default line draw style. Equals to
TYPE:
|
STEPS |
The steps line draw style. Equals to
TYPE:
|
STEPS_PRE |
The pre-steps line draw style. Equals to
TYPE:
|
STEPS_MID |
The mid-steps line draw style. Equals to
TYPE:
|
STEPS_POST |
The post-steps line draw style. Equals to
TYPE:
|
HATCH_STYLE
The supported hatch styles.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
DEFAULT |
The default hatch style. Equals to
TYPE:
|
DIAGONAL |
The diagonal hatch style. Equals to
TYPE:
|
BACK_DIAGONAL |
The back diagonal hatch style. Equals to
TYPE:
|
VERTICAL |
The vertical hatch style. Equals to
TYPE:
|
HORIZONTAL |
The horizontal hatch style. Equals to
TYPE:
|
CROSSED |
The crossed hatch style. Equals to
TYPE:
|
CROSSED_DIAGONAL |
The crossed diagonal hatch style. Equals to
TYPE:
|
DOTS |
The dots hatch style. Equals to
TYPE:
|
CIRCLES |
The circles hatch style. Equals to
TYPE:
|
STARS |
The stars hatch style. Equals to
TYPE:
|
LEGEND_ALIGN
The supported legend alignments.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
DEFAULT |
The default legend alignment. Same as
TYPE:
|
CENTER |
The center legend alignment. Equals to
TYPE:
|
RIGHT |
The right legend alignment. Equals to
TYPE:
|
LEFT |
The left legend alignment. Equals to
TYPE:
|
LEGEND_LOCATION
The supported legend locations.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
BEST |
Automatic best location. Equals to
TYPE:
|
UPPER_RIGHT |
Upper right corner. Equals to
TYPE:
|
UPPER_LEFT |
Upper left corner. Equals to
TYPE:
|
LOWER_LEFT |
Lower left corner. Equals to
TYPE:
|
LOWER_RIGHT |
Lower right corner. Equals to
TYPE:
|
RIGHT |
Center right. Equals to
TYPE:
|
CENTER_LEFT |
Center left. Equals to
TYPE:
|
CENTER_RIGHT |
Center right. Equals to
TYPE:
|
LOWER_CENTER |
Lower center. Equals to
TYPE:
|
UPPER_CENTER |
Upper center. Equals to
TYPE:
|
CENTER |
Center. Equals to
TYPE:
|
HISTOGRAM_TYPE
The supported histogram types.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
BAR |
The bar histogram style. Equals to
TYPE:
|
BAR_STACKED |
The stacked bar histogram style. Equals to
TYPE:
|
STEP |
The step histogram style. Equals to
TYPE:
|
STEPFILLED |
The stepfilled histogram style. Equals to
TYPE:
|
COLORS
The predefined colors using pypalettes (https://y-sunflower.github.io/pypalettes/).
All palette names are valid pypalettes identifiers. You can use any of the 2500+ palettes available in pypalettes by passing the palette name as a string.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
Blues |
Sequential blue palette. Equals to
TYPE:
|
Greens |
Sequential green palette. Equals to
TYPE:
|
Oranges |
Sequential orange palette. Equals to
TYPE:
|
Purples |
Sequential purple palette. Equals to
TYPE:
|
Reds |
Sequential red palette. Equals to
TYPE:
|
Sunset2 |
Multi-hue sunset palette. Equals to
TYPE:
|
YlGnBu |
Multi-hue yellow-green-blue palette. Equals to
TYPE:
|
YlOrRd |
Multi-hue yellow-orange-red palette. Equals to
TYPE:
|
PuBuGn |
Multi-hue purple-blue-green palette. Equals to
TYPE:
|
RdBu |
Diverging red-blue palette. Equals to
TYPE:
|
BrBG |
Diverging brown-blue-green palette. Equals to
TYPE:
|
PuOr |
Diverging purple-orange palette. Equals to
TYPE:
|
Spectral |
Diverging spectral palette. Equals to
TYPE:
|
RdYlBu |
Diverging red-yellow-blue palette. Equals to
TYPE:
|
RdYlGn |
Diverging red-yellow-green palette. Equals to
TYPE:
|
Pastel |
Soft pastel categorical palette. Equals to
TYPE:
|
Set2 |
ColorBrewer Set2 categorical palette. Equals to
TYPE:
|
Accent |
ColorBrewer Accent categorical palette. Equals to
TYPE:
|
Dark2 |
ColorBrewer Dark2 categorical palette. Equals to
TYPE:
|
Paired |
ColorBrewer Paired categorical palette (high contrast). Equals to
TYPE:
|
Set1 |
ColorBrewer Set1 categorical palette (high contrast). Equals to
TYPE:
|
Greys |
Grayscale palette for monochrome visualizations. Equals to
TYPE:
|
Viridis |
Perceptually uniform, color-blind friendly. Equals to
TYPE:
|
Cividis |
Color-blind friendly (optimized for CVD). Equals to
TYPE:
|
Inferno |
Perceptually uniform, color-blind friendly. Equals to
TYPE:
|
Plasma |
Perceptually uniform, color-blind friendly. Equals to
TYPE:
|
Magma |
Perceptually uniform, color-blind friendly. Equals to
TYPE:
|
Turbo |
Rainbow-like but perceptually better. Equals to
TYPE:
|
Coolwarm |
Diverging cool-warm palette. Equals to
TYPE:
|
Tab10 |
Tableau 10-color categorical palette. Equals to
TYPE:
|
Tab20 |
Tableau 20-color categorical palette. Equals to
TYPE:
|
NORMALIZE
The supported normalization options.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
LINEAR |
The linear normalization. Equals to
TYPE:
|
LOG |
The logistic normalization. Equals to
TYPE:
|
SYMLOG |
The symlog normalization. Equals to
TYPE:
|
ASINH |
The asinh normalization. Equals to
TYPE:
|
LOGIT |
The logit normalization. Equals to
TYPE:
|
ORIENTATION
VALFMT
The predefined value formats.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
DEFAULT |
The default value format. Equals to
TYPE:
|
INTEGER |
The integer value format. Equals to
TYPE:
|
DECIMAL |
The decimal value format (1 decimal place). Equals to
TYPE:
|
DECIMAL_2 |
The decimal value format (2 decimal places). Equals to
TYPE:
|
DECIMAL_3 |
The decimal value format (3 decimal places). Equals to
TYPE:
|
PERCENT |
The percentage value format (1 decimal place). Equals to
TYPE:
|
PERCENT_INT |
The percentage value format (no decimals). Equals to
TYPE:
|
SCIENTIFIC |
The scientific notation format. Equals to
TYPE:
|
THOUSANDS |
The thousands separator format. Equals to
TYPE:
|
THEME
The predefined themes.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
DEFAULT |
The default theme. Equals to
TYPE:
|
GREYSCALE |
The greyscale theme. Equals to
TYPE:
|
PUBLICATION |
The publication theme. Equals to
TYPE:
|
BACKGROUND |
The background theme (light gray for de-emphasized elements). Equals to
TYPE:
|
SHOW_GRID
The supported show grid options.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
DEFAULT |
The default show grid. Same as
TYPE:
|
NONE |
Do not show the grid. Equals to
TYPE:
|
X |
Show the x-axis grid. Equals to
TYPE:
|
Y |
Show the y-axis grid. Equals to
TYPE:
|
BOTH |
Show both the x- and y-axis grid. Equals to
TYPE:
|
SCALE
The supported scale options.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
DEFAULT |
The default scale. Same as
TYPE:
|
LINEAR |
The linear scale. Equals to
TYPE:
|
LOG |
The log scale. Equals to
TYPE:
|
SYMLOG |
The symlog scale. Equals to
TYPE:
|
ASINH |
The asinh scale. Equals to
TYPE:
|
ASPECT_RATIO
The supported aspect ratio options.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
DEFAULT |
The default aspect ratio. Same as
TYPE:
|
AUTO |
Automatic aspect ratio. Equals to
TYPE:
|
EQUAL |
Equal aspect ratio (1:1). Equals to
TYPE:
|
COLORBAR_LOCATION
The supported colorbar locations.
Examples:
| ATTRIBUTE | DESCRIPTION |
|---|---|
RIGHT |
Right side of the chart. Equals to
TYPE:
|
LEFT |
Left side of the chart. Equals to
TYPE:
|
TOP |
Top of the chart. Equals to
TYPE:
|
BOTTOM |
Bottom of the chart. Equals to
TYPE:
|