bokeh.core.enums (original) (raw)

Common enumerations to be used together with Enum property.

This module provides many pre-defined enumerations, as well as functions for creating new enumerations.

New enumerations can be created using the enumeration() function:

#: Specify a nautically named side, port or starboard MyEnum = enumeration("port", "starboard")

Typically, enumerations are used to define Enum properties:

from bokeh.model import Model from bokeh.core.properties import Enum

class MyModel(Model):

location = Enum(MyEnum, help="""
Whether the thing should be a port or starboard.
""")

Enumerations have a defined order and support iteration:

for loc in MyEnum: ... print(loc) ... port starboard

as well as containment tests:

"port" in MyEnum True

Enumerations can be easily documented in Sphinx documentation with thebokeh_enum Sphinx extension.


enumeration(*values: Any, case_sensitive: bool = True, quote: bool = False) → Enumeration[source]#

Create an enumeration() object from a sequence of values.

Call enumeration with a sequence of (unique) strings to create an Enumeration object:

#: Specify the horizontal alignment for rendering text TextAlign = enumeration("left", "right", "center")

Parameters:

Raises:

ValueError if values empty , if any value is not a string or not unique

Returns:

Enumeration


Align = Enumeration(start, center, end)#

AlternationPolicy = Enumeration(none, even, odd, every)#

Anchor = Enumeration(top_left, top_center, top_right, center_left, center_center, center_right, bottom_left, bottom_center, bottom_right, top, left, center, right, bottom)#

AngleUnits = Enumeration(deg, rad, grad, turn)#

Auto = Enumeration(auto)#

AutosizeMode = Enumeration(fit_columns, fit_viewport, force_fit, none)#

BuiltinFormatter = Enumeration(raw, basic, numeral, printf, datetime)#

ButtonType = Enumeration(default, primary, success, warning, danger, light)#

CalendarPosition = Enumeration(auto, above, below)#

ContextWhich = Enumeration(start, center, end, all)#

CoordinateUnits = Enumeration(canvas, screen, data)#

DashPattern = Enumeration(solid, dashed, dotted, dotdash, dashdot)#

DateFormat = Enumeration(ATOM, W3C, RFC-3339, ISO-8601, COOKIE, RFC-822, RFC-850, RFC-1036, RFC-1123, RFC-2822, RSS, TIMESTAMP)#

DatetimeUnits = Enumeration(microseconds, milliseconds, seconds, minsec, minutes, hourmin, hours, days, months, years)#

Dimension = Enumeration(width, height)#

Dimensions = Enumeration(width, height, both)#

Direction = Enumeration(clock, anticlock)#

FlowMode = Enumeration(block, inline)#

FontStyle = Enumeration(normal, italic, bold, bold italic)#

HAlign = Enumeration(left, center, right)#

HatchPattern = Enumeration(blank, dot, ring, horizontal .... zontal_wave, vertical_wave, criss_cross)#

Enumeration(blank, dot, ring, horizontal_line, vertical_line, cross,

horizontal_dash, vertical_dash, spiral, right_diagonal_line,

left_diagonal_line, diagonal_cross, right_diagonal_dash,

left_diagonal_dash, horizontal_wave, vertical_wave, criss_cross)

HatchPatternAbbreviation = Enumeration(' ', '.', 'o', '-', '|', '+', '"', ':', '@', '/', '\\', 'x', ',', '`', 'v', '>', '*')#

HexTileOrientation = Enumeration(pointytop, flattop)#

HoldPolicy = Enumeration(combine, collect)#

HorizontalLocation = Enumeration(left, right)#

ImageOrigin = Enumeration(bottom_left, top_left, bottom_right, top_right)#

ImplicitTarget = Enumeration(viewport, canvas, plot, frame, parent)#

JitterRandomDistribution = Enumeration(uniform, normal)#

KeyModifier = Enumeration(shift, ctrl, alt)#

LabelOrientation = Enumeration(horizontal, vertical, parallel, normal)#

LatLon = Enumeration(lat, lon)#

LegendClickPolicy = Enumeration(none, hide, mute)#

LegendLocation = Enumeration(top_left, top_center, top_right, center_left, center_center, center_right, bottom_left, bottom_center, bottom_right, top, left, center, right, bottom)#

LineCap = Enumeration(butt, round, square)#

LineDash = Enumeration(solid, dashed, dotted, dotdash, dashdot)#

LineJoin = Enumeration(miter, round, bevel)#

Location = Enumeration(above, below, left, right)#

MapType = Enumeration(satellite, roadmap, terrain, hybrid)#

MarkerType = Enumeration(asterisk, circle, circle_cro .... angle, triangle_dot, triangle_pin, x, y)#

Enumeration(asterisk, circle, circle_cross, circle_dot, circle_x,

circle_y, cross, dash, diamond, diamond_cross, diamond_dot, dot,

hex, hex_dot, inverted_triangle, plus, square, square_cross,

square_dot, square_pin, square_x, star, star_dot, triangle,

triangle_dot, triangle_pin, x, y)

Movable = Enumeration(none, x, y, both)#

NamedColor = Enumeration(aliceblue, antiquewhite, aqu .... white, whitesmoke, yellow, yellowgreen)#

Specify one of the CSS4 named colors (https://www.w3.org/TR/css-color-4/#named-colors)

Enumeration(aliceblue, antiquewhite, aqua, aquamarine, azure, beige,

bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood,

cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk,

crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray,

darkgreen, darkgrey, darkkhaki, darkmagenta, darkolivegreen,

darkorange, darkorchid, darkred, darksalmon, darkseagreen,

darkslateblue, darkslategray, darkslategrey, darkturquoise,

darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue,

firebrick, floralwhite, forestgreen, fuchsia, gainsboro,

ghostwhite, gold, goldenrod, gray, green, greenyellow, grey,

honeydew, hotpink, indianred, indigo, ivory, khaki, lavender,

lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral,

lightcyan, lightgoldenrodyellow, lightgray, lightgreen, lightgrey,

lightpink, lightsalmon, lightseagreen, lightskyblue,

lightslategray, lightslategrey, lightsteelblue, lightyellow, lime,

limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue,

mediumorchid, mediumpurple, mediumseagreen, mediumslateblue,

mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue,

mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive,

olivedrab, orange, orangered, orchid, palegoldenrod, palegreen,

paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink,

plum, powderblue, purple, rebeccapurple, red, rosybrown,

royalblue, saddlebrown, salmon, sandybrown, seagreen, seashell,

sienna, silver, skyblue, slateblue, slategray, slategrey, snow,

springgreen, steelblue, tan, teal, thistle, tomato, turquoise,

violet, wheat, white, whitesmoke, yellow, yellowgreen)

NumeralLanguage = Enumeration(be-nl, chs, cs, da-dk, de-ch, de, en, en-gb, es-ES, es, et, fi, fr-CA, fr-ch, fr, hu, it, ja, nl-nl, pl, pt-br, pt-pt, ru, ru-UA, sk, th, tr, uk-UA)#

Orientation = Enumeration(horizontal, vertical)#

OutlineShapeName = Enumeration(none, box, rectangle, square, circle, ellipse, trapezoid, parallelogram, diamond, triangle)#

OutputBackend = Enumeration(canvas, svg, webgl)#

PaddingUnits = Enumeration(percent, absolute)#

Palette = Enumeration(Accent3, Accent4, Accent5, A .... Rd5, YlOrRd6, YlOrRd7, YlOrRd8, YlOrRd9)#

Enumeration(Accent3, Accent4, Accent5, Accent6, Accent7, Accent8,

Blues3, Blues4, Blues5, Blues6, Blues7, Blues8, Blues9, Blues256,

Bokeh3, Bokeh4, Bokeh5, Bokeh6, Bokeh7, Bokeh8, BrBG3, BrBG4,

BrBG5, BrBG6, BrBG7, BrBG8, BrBG9, BrBG10, BrBG11, Bright3,

Bright4, Bright5, Bright6, Bright7, BuGn3, BuGn4, BuGn5, BuGn6,

BuGn7, BuGn8, BuGn9, BuPu3, BuPu4, BuPu5, BuPu6, BuPu7, BuPu8,

BuPu9, BuRd3, BuRd4, BuRd5, BuRd6, BuRd7, BuRd8, BuRd9,

Category10_3, Category10_4, Category10_5, Category10_6,

Category10_7, Category10_8, Category10_9, Category10_10,

Category20_3, Category20_4, Category20_5, Category20_6,

Category20_7, Category20_8, Category20_9, Category20_10,

Category20_11, Category20_12, Category20_13, Category20_14,

Category20_15, Category20_16, Category20_17, Category20_18,

Category20_19, Category20_20, Category20b3, Category20b4,

Category20b5, Category20b6, Category20b7, Category20b8,

Category20b9, Category20b10, Category20b11, Category20b12,

Category20b13, Category20b14, Category20b15, Category20b16,

Category20b17, Category20b18, Category20b19, Category20b20,

Category20c3, Category20c4, Category20c5, Category20c6,

Category20c7, Category20c8, Category20c9, Category20c10,

Category20c11, Category20c12, Category20c13, Category20c14,

Category20c15, Category20c16, Category20c17, Category20c18,

Category20c19, Category20c20, Cividis3, Cividis4, Cividis5,

Cividis6, Cividis7, Cividis8, Cividis9, Cividis10, Cividis11,

Cividis256, Colorblind3, Colorblind4, Colorblind5, Colorblind6,

Colorblind7, Colorblind8, Dark2_3, Dark2_4, Dark2_5, Dark2_6,

Dark2_7, Dark2_8, GnBu3, GnBu4, GnBu5, GnBu6, GnBu7, GnBu8, GnBu9,

Greens3, Greens4, Greens5, Greens6, Greens7, Greens8, Greens9,

Greens256, Greys3, Greys4, Greys5, Greys6, Greys7, Greys8, Greys9,

Greys256, HighContrast3, Inferno3, Inferno4, Inferno5, Inferno6,

Inferno7, Inferno8, Inferno9, Inferno10, Inferno11, Inferno256,

Iridescent3, Iridescent4, Iridescent5, Iridescent6, Iridescent7,

Iridescent8, Iridescent9, Iridescent10, Iridescent11,

Iridescent12, Iridescent13, Iridescent14, Iridescent15,

Iridescent16, Iridescent17, Iridescent18, Iridescent19,

Iridescent20, Iridescent21, Iridescent22, Iridescent23, Light3,

Light4, Light5, Light6, Light7, Light8, Light9, Magma3, Magma4,

Magma5, Magma6, Magma7, Magma8, Magma9, Magma10, Magma11,

Magma256, MediumContrast3, MediumContrast4, MediumContrast5,

MediumContrast6, Muted3, Muted4, Muted5, Muted6, Muted7, Muted8,

Muted9, OrRd3, OrRd4, OrRd5, OrRd6, OrRd7, OrRd8, OrRd9, Oranges3,

Oranges4, Oranges5, Oranges6, Oranges7, Oranges8, Oranges9,

Oranges256, PRGn3, PRGn4, PRGn5, PRGn6, PRGn7, PRGn8, PRGn9,

PRGn10, PRGn11, Paired3, Paired4, Paired5, Paired6, Paired7,

Paired8, Paired9, Paired10, Paired11, Paired12, Pastel1_3,

Pastel1_4, Pastel1_5, Pastel1_6, Pastel1_7, Pastel1_8, Pastel1_9,

Pastel2_3, Pastel2_4, Pastel2_5, Pastel2_6, Pastel2_7, Pastel2_8,

PiYG3, PiYG4, PiYG5, PiYG6, PiYG7, PiYG8, PiYG9, PiYG10, PiYG11,

Plasma3, Plasma4, Plasma5, Plasma6, Plasma7, Plasma8, Plasma9,

Plasma10, Plasma11, Plasma256, PuBu3, PuBu4, PuBu5, PuBu6, PuBu7,

PuBu8, PuBu9, PuBuGn3, PuBuGn4, PuBuGn5, PuBuGn6, PuBuGn7,

PuBuGn8, PuBuGn9, PuOr3, PuOr4, PuOr5, PuOr6, PuOr7, PuOr8, PuOr9,

PuOr10, PuOr11, PuRd3, PuRd4, PuRd5, PuRd6, PuRd7, PuRd8, PuRd9,

Purples3, Purples4, Purples5, Purples6, Purples7, Purples8,

Purples9, Purples256, RdBu3, RdBu4, RdBu5, RdBu6, RdBu7, RdBu8,

RdBu9, RdBu10, RdBu11, RdGy3, RdGy4, RdGy5, RdGy6, RdGy7, RdGy8,

RdGy9, RdGy10, RdGy11, RdPu3, RdPu4, RdPu5, RdPu6, RdPu7, RdPu8,

RdPu9, RdYlBu3, RdYlBu4, RdYlBu5, RdYlBu6, RdYlBu7, RdYlBu8,

RdYlBu9, RdYlBu10, RdYlBu11, RdYlGn3, RdYlGn4, RdYlGn5, RdYlGn6,

RdYlGn7, RdYlGn8, RdYlGn9, RdYlGn10, RdYlGn11, Reds3, Reds4,

Reds5, Reds6, Reds7, Reds8, Reds9, Reds256, Set1_3, Set1_4,

Set1_5, Set1_6, Set1_7, Set1_8, Set1_9, Set2_3, Set2_4, Set2_5,

Set2_6, Set2_7, Set2_8, Set3_3, Set3_4, Set3_5, Set3_6, Set3_7,

Set3_8, Set3_9, Set3_10, Set3_11, Set3_12, Spectral3, Spectral4,

Spectral5, Spectral6, Spectral7, Spectral8, Spectral9, Spectral10,

Spectral11, Sunset3, Sunset4, Sunset5, Sunset6, Sunset7, Sunset8,

Sunset9, Sunset10, Sunset11, TolPRGn3, TolPRGn4, TolPRGn5,

TolPRGn6, TolPRGn7, TolPRGn8, TolPRGn9, TolRainbow3, TolRainbow4,

TolRainbow5, TolRainbow6, TolRainbow7, TolRainbow8, TolRainbow9,

TolRainbow10, TolRainbow11, TolRainbow12, TolRainbow13,

TolRainbow14, TolRainbow15, TolRainbow16, TolRainbow17,

TolRainbow18, TolRainbow19, TolRainbow20, TolRainbow21,

TolRainbow22, TolRainbow23, TolYlOrBr3, TolYlOrBr4, TolYlOrBr5,

TolYlOrBr6, TolYlOrBr7, TolYlOrBr8, TolYlOrBr9, Turbo3, Turbo4,

Turbo5, Turbo6, Turbo7, Turbo8, Turbo9, Turbo10, Turbo11,

Turbo256, Vibrant3, Vibrant4, Vibrant5, Vibrant6, Vibrant7,

Viridis3, Viridis4, Viridis5, Viridis6, Viridis7, Viridis8,

Viridis9, Viridis10, Viridis11, Viridis256, YlGn3, YlGn4, YlGn5,

YlGn6, YlGn7, YlGn8, YlGn9, YlGnBu3, YlGnBu4, YlGnBu5, YlGnBu6,

YlGnBu7, YlGnBu8, YlGnBu9, YlOrBr3, YlOrBr4, YlOrBr5, YlOrBr6,

YlOrBr7, YlOrBr8, YlOrBr9, YlOrRd3, YlOrRd4, YlOrRd5, YlOrRd6,

YlOrRd7, YlOrRd8, YlOrRd9)

PanDirection = Enumeration(left, right, up, down, west, east, north, south)#

Place = Enumeration(above, below, left, right, center)#

RadiusDimension = Enumeration(x, y, max, min)#

RegionSelectionMode = Enumeration(replace, append, intersect, subtract, xor)#

RenderLevel = Enumeration(image, underlay, glyph, guide, annotation, overlay)#

ResetPolicy = Enumeration(standard, event_only)#

Resizable = Enumeration(none, left, right, top, bottom, x, y, all)#

ResolutionType = Enumeration(microseconds, milliseconds, seconds, minsec, minutes, hourmin, hours, days, months, years)#

RoundingFunction = Enumeration(round, nearest, floor, rounddown, ceil, roundup)#

ScrollbarPolicy = Enumeration(auto, visible, hidden)#

SelectionMode = Enumeration(replace, append, intersect, subtract, xor, toggle)#

SizingMode = Enumeration(stretch_width, stretch_height, stretch_both, scale_width, scale_height, scale_both, fixed, inherit)#

SizingPolicy = Enumeration(fixed, fit, min, max)#

SortDirection = Enumeration(ascending, descending)#

SpatialUnits = Enumeration(screen, data)#

StartEnd = Enumeration(start, end)#

StepMode = Enumeration(before, after, center)#

TeXDisplay = Enumeration(inline, block, auto)#

TextAlign = Enumeration(left, right, center)#

TextBaseline = Enumeration(top, middle, bottom, alphabetic, hanging, ideographic)#

TextureRepetition = Enumeration(repeat, repeat_x, repeat_y, no_repeat)#

ToolIcon = Enumeration(append_mode, arrow_down_to_b .... _zoom, y_grip, y_pan, zoom_in, zoom_out)#

Enumeration(append_mode, arrow_down_to_bar, arrow_up_from_bar,

auto_box_zoom, bold, box_edit, box_select, box_zoom, caret_down,

caret_left, caret_right, caret_up, check, chevron_down,

chevron_left, chevron_right, chevron_up, clear_selection, copy,

crosshair, dark_theme, delete, freehand_draw, fullscreen, help,

hover, intersect_mode, invert_selection, italic, lasso_select,

light_theme, line_edit, maximize, minimize, pan, pin, point_draw,

pointer, poly_draw, poly_edit, polygon_select, range, redo,

replace_mode, reset, save, see_off, see_on, settings, square,

square_check, subtract_mode, tap_select, text_align_center,

text_align_left, text_align_right, undo, unknown, unpin,

wheel_pan, wheel_zoom, x_box_select, x_box_zoom, x_grip, x_pan,

xor_mode, y_box_select, y_box_zoom, y_grip, y_pan, zoom_in,

zoom_out)

ToolName = Enumeration(auto_box_zoom, box_select, b .... yzoom_in, yzoom_out, zoom_in, zoom_out)#

Enumeration(auto_box_zoom, box_select, box_zoom, click, copy,

crosshair, doubletap, examine, freehand_draw, fullscreen, help,

hover, lasso_select, pan, pan_down, pan_east, pan_left, pan_north,

pan_right, pan_south, pan_up, pan_west, poly_select, redo, reset,

save, tap, undo, wheel_zoom, xbox_select, xbox_zoom, xcrosshair,

xpan, xwheel_pan, xwheel_zoom, xzoom_in, xzoom_out, ybox_select,

ybox_zoom, ycrosshair, ypan, ywheel_pan, ywheel_zoom, yzoom_in,

yzoom_out, zoom_in, zoom_out)

TooltipAttachment = Enumeration(horizontal, vertical, left, right, above, below)#

TooltipFieldFormatter = Enumeration(numeral, datetime, printf)#

TrackPolicy = Enumeration(auto, min, max, flex, fixed)#

VAlign = Enumeration(top, center, bottom)#

VerticalAlign = Enumeration(top, middle, bottom)#

VerticalLocation = Enumeration(above, below)#

WindowAxis = Enumeration(none, x, y)#