bokeh.models.glyphs

Models for display visual shapes whose attributes can be associated with data columns from data sources.

class AnnularWedge(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render annular wedges.

Example

source: tests/glyphs/AnnularWedge.py

direction

property type: direction:Enum(‘clock’, ‘anticlock’)

Which direction to stroke between the start and end angles.

end_angle

property type: end_angle:AngleSpec(units_default=’rad’)

The angles to end the annular wedges, as measured from the horizontal.

end_angle_units

property type: end_angle_units:Enum(‘deg’, ‘rad’)

fill_alpha

property type: fill_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The fill alpha values for the annular wedges.

fill_color

property type: fill_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The fill color values for the annular wedges.

inner_radius

property type: inner_radius:DistanceSpec(units_default=’data’)

The inner radii of the annular wedges.

inner_radius_units

property type: inner_radius_units:Enum(‘screen’, ‘data’)

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line alpha values for the annular wedges.

line_cap

property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)

The line cap values for the annular wedges.

line_color

property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The line color values for the annular wedges.

line_dash

property type: line_dash:DashPattern

The line dash values for the annular wedges.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the annular wedges.

line_join

property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)

The line join values for the annular wedges.

line_width

property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line width values for the annular wedges.

outer_radius

property type: outer_radius:DistanceSpec(units_default=’data’)

The outer radii of the annular wedges.

outer_radius_units

property type: outer_radius_units:Enum(‘screen’, ‘data’)

start_angle

property type: start_angle:AngleSpec(units_default=’rad’)

The angles to start the annular wedges, as measured from the horizontal.

start_angle_units

property type: start_angle_units:Enum(‘deg’, ‘rad’)

x

property type: x:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of the center of the annular wedges.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of the center of the annular wedges.

JSON Prototype
{
  "direction": "anticlock",
  "end_angle": null,
  "fill_alpha": {
    "value": 1.0
  },
  "fill_color": {
    "value": "gray"
  },
  "id": "b2015fe6-e31f-4b5b-b7a3-62147b66dd77",
  "inner_radius": null,
  "line_alpha": {
    "value": 1.0
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "outer_radius": null,
  "start_angle": null,
  "tags": [],
  "visible": true,
  "x": null,
  "y": null
}
class Annulus(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render annuli.

Example

source: tests/glyphs/Annulus.py

fill_alpha

property type: fill_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The fill alpha values for the annuli.

fill_color

property type: fill_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The fill color values for the annuli.

inner_radius

property type: inner_radius:DistanceSpec(units_default=’data’)

The inner radii of the annuli.

inner_radius_units

property type: inner_radius_units:Enum(‘screen’, ‘data’)

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line alpha values for the annuli.

line_cap

property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)

The line cap values for the annuli.

line_color

property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The line color values for the annuli.

line_dash

property type: line_dash:DashPattern

The line dash values for the annuli.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the annuli.

line_join

property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)

The line join values for the annuli.

line_width

property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line width values for the annuli.

outer_radius

property type: outer_radius:DistanceSpec(units_default=’data’)

The outer radii of the annuli.

outer_radius_units

property type: outer_radius_units:Enum(‘screen’, ‘data’)

x

property type: x:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of the center of the annuli.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of the center of the annuli.

JSON Prototype
{
  "fill_alpha": {
    "value": 1.0
  },
  "fill_color": {
    "value": "gray"
  },
  "id": "aa64d379-09e8-4b8c-928e-20e35eb7a2b7",
  "inner_radius": null,
  "line_alpha": {
    "value": 1.0
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "outer_radius": null,
  "tags": [],
  "visible": true,
  "x": null,
  "y": null
}
class Arc(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render arcs.

Example

source: tests/glyphs/Arc.py

direction

property type: direction:Enum(‘clock’, ‘anticlock’)

Which direction to stroke between the start and end angles.

end_angle

property type: end_angle:AngleSpec(units_default=’rad’)

The angles to end the arcs, as measured from the horizontal.

end_angle_units

property type: end_angle_units:Enum(‘deg’, ‘rad’)

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line alpha values for the arcs.

line_cap

property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)

The line cap values for the arcs.

line_color

property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The line color values for the arcs.

line_dash

property type: line_dash:DashPattern

The line dash values for the arcs.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the arcs.

line_join

property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)

The line join values for the arcs.

line_width

property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line width values for the arcs.

radius

property type: radius:DistanceSpec(units_default=’data’)

Radius of the arc.

radius_units

property type: radius_units:Enum(‘screen’, ‘data’)

start_angle

property type: start_angle:AngleSpec(units_default=’rad’)

The angles to start the arcs, as measured from the horizontal.

start_angle_units

property type: start_angle_units:Enum(‘deg’, ‘rad’)

x

property type: x:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of the center of the arcs.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of the center of the arcs.

JSON Prototype
{
  "direction": "anticlock",
  "end_angle": null,
  "id": "71580afc-4d2b-4281-94f4-2f96ca58989f",
  "line_alpha": {
    "value": 1.0
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "radius": null,
  "start_angle": null,
  "tags": [],
  "visible": true,
  "x": null,
  "y": null
}
class Bezier(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render Bézier curves.

For more information consult the Wikipedia article for Bézier curve.

Example

source: tests/glyphs/Bezier.py

cx0

property type: cx0:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of first control points.

cx1

property type: cx1:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of second control points.

cy0

property type: cy0:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of first control points.

cy1

property type: cy1:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of second control points.

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line alpha values for the Bézier curves.

line_cap

property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)

The line cap values for the Bézier curves.

line_color

property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The line color values for the Bézier curves.

line_dash

property type: line_dash:DashPattern

The line dash values for the Bézier curves.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the Bézier curves.

line_join

property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)

The line join values for the Bézier curves.

line_width

property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line width values for the Bézier curves.

x0

property type: x0:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of the starting points.

x1

property type: x1:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of the ending points.

y0

property type: y0:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of the starting points.

y1

property type: y1:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of the ending points.

JSON Prototype
{
  "cx0": null,
  "cx1": null,
  "cy0": null,
  "cy1": null,
  "id": "00dd5f25-691a-4f68-bb93-5bb735e77b60",
  "line_alpha": {
    "value": 1.0
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "tags": [],
  "visible": true,
  "x0": null,
  "x1": null,
  "y0": null,
  "y1": null
}
class Gear(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render gears.

The details and nomenclature concerning gear construction can be quite involved. For more information, consult the Wikipedia article for Gear.

Example

source: tests/glyphs/Gear.py

angle

property type: angle:AngleSpec(units_default=’rad’)

The angle the gears are rotated from horizontal. [rad]

angle_units

property type: angle_units:Enum(‘deg’, ‘rad’)

fill_alpha

property type: fill_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The fill alpha values for the gears.

fill_color

property type: fill_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The fill color values for the gears.

internal

property type: internal:NumberSpec(String, Dict(String, Either(String, Float)), Float)

Whether the gear teeth are internal. [bool]

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line alpha values for the gears.

line_cap

property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)

The line cap values for the gears.

line_color

property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The line color values for the gears.

line_dash

property type: line_dash:DashPattern

The line dash values for the gears.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the gears.

line_join

property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)

The line join values for the gears.

line_width

property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line width values for the gears.

module

property type: module:NumberSpec(String, Dict(String, Either(String, Float)), Float)

A scaling factor, given by:

m = p / pi

where p is the circular pitch, defined as the distance from one face of a tooth to the corresponding face of an adjacent tooth on the same gear, measured along the pitch circle. [float]

pressure_angle

property type: pressure_angle:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The complement of the angle between the direction that the teeth exert force on each other, and the line joining the centers of the two gears. [deg]

shaft_size

property type: shaft_size:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The central gear shaft size as a percentage of the overall gear size. [float]

teeth

property type: teeth:NumberSpec(String, Dict(String, Either(String, Float)), Float)

How many teeth the gears have. [int]

x

property type: x:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of the center of the gears.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of the center of the gears.

JSON Prototype
{
  "angle": {
    "units": "rad",
    "value": 0
  },
  "fill_alpha": {
    "value": 1.0
  },
  "fill_color": {
    "value": "gray"
  },
  "id": "101ddd8d-a603-41bb-883e-72570f8ddb7d",
  "internal": {
    "value": false
  },
  "line_alpha": {
    "value": 1.0
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "module": null,
  "name": null,
  "pressure_angle": {
    "value": 20
  },
  "shaft_size": {
    "value": 0.3
  },
  "tags": [],
  "teeth": null,
  "visible": true,
  "x": null,
  "y": null
}
class Glyph(**kwargs)

Bases: bokeh.model.Model

Base class for all glyph models.

visible

property type: visible:Bool

Whether the glyph should render or not.

JSON Prototype
{
  "id": "b6632eba-5a56-4078-816d-bee63f2a6455",
  "name": null,
  "tags": [],
  "visible": true
}
class Image(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render images given as scalar data together with a color mapper.

color_mapper

property type: color_mapper:Instance(LinearColorMapper)

A ColorMapper to use to map the scalar data from image into RGBA values for display.

Note

The color mapping step happens on the client.

dh

property type: dh:DistanceSpec(units_default=’data’)

The height of the plot region that the image will occupy.

Note

This is not the number of pixels that an image is tall. That number is fixed by the image itself.

dh_units

property type: dh_units:Enum(‘screen’, ‘data’)

dilate

property type: dilate:Bool

Whether to always round fractional pixel locations in such a way as to make the images bigger.

This setting may be useful if pixel rounding errors are causing images to have a gap between them, when they should appear flush.

dw

property type: dw:DistanceSpec(units_default=’data’)

The widths of the plot regions that the images will occupy.

Note

This is not the number of pixels that an image is wide. That number is fixed by the image itself.

dw_units

property type: dw_units:Enum(‘screen’, ‘data’)

image

property type: image:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The arrays of scalar data for the images to be colormapped.

x

property type: x:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates to locate the image anchors.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates to locate the image anchors.

JSON Prototype
{
  "color_mapper": {
    "id": "49c318cf-b959-4e23-bb61-062a40d9b325",
    "type": "LinearColorMapper"
  },
  "dh": null,
  "dilate": false,
  "dw": null,
  "id": "a8f750b0-ca43-4cd3-886d-2b05f32734f8",
  "image": null,
  "name": null,
  "tags": [],
  "visible": true,
  "x": null,
  "y": null
}
class ImageRGBA(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render images given as RGBA data.

cols

property type: cols:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The numbers of columns in the images

dh

property type: dh:DistanceSpec(units_default=’data’)

The height of the plot region that the image will occupy.

Note

This is not the number of pixels that an image is tall. That number is fixed by the image itself.

dh_units

property type: dh_units:Enum(‘screen’, ‘data’)

dilate

property type: dilate:Bool

Whether to always round fractional pixel locations in such a way as to make the images bigger.

This setting may be useful if pixel rounding errors are causing images to have a gap between them, when they should appear flush.

dw

property type: dw:DistanceSpec(units_default=’data’)

The widths of the plot regions that the images will occupy.

Note

This is not the number of pixels that an image is wide. That number is fixed by the image itself.

dw_units

property type: dw_units:Enum(‘screen’, ‘data’)

image

property type: image:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The arrays of RGBA data for the images.

rows

property type: rows:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The numbers of rows in the images

x

property type: x:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates to locate the image anchors.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates to locate the image anchors.

JSON Prototype
{
  "cols": null,
  "dh": null,
  "dilate": false,
  "dw": null,
  "id": "9e942aad-c147-4133-95c5-5d3fd376f4ff",
  "image": null,
  "name": null,
  "rows": null,
  "tags": [],
  "visible": true,
  "x": null,
  "y": null
}
class ImageURL(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render images loaded from given URLs.

Example

source: tests/glyphs/ImageURL.py

anchor

property type: anchor:Enum(‘top_left’, ‘top_center’, ‘top_right’, ‘right_center’, ‘bottom_right’, ‘bottom_center’, ‘bottom_left’, ‘left_center’, ‘center’)

What position of the image should be anchored at the x, y coordinates.

angle

property type: angle:AngleSpec(units_default=’rad’)

The angles to rotate the images, as measured from the horizontal.

angle_units

property type: angle_units:Enum(‘deg’, ‘rad’)

dilate

property type: dilate:Bool

Whether to always round fractional pixel locations in such a way as to make the images bigger.

This setting may be useful if pixel rounding errors are causing images to have a gap between them, when they should appear flush.

global_alpha

property type: global_alpha:Float

An overall opacity that each image is rendered with (in addition to any inherent alpha values in the image itself).

h

property type: h:DistanceSpec(units_default=’data’)

The height of the plot region that the image will occupy.

Note

This is not the number of pixels that an image is tall. That number is fixed by the image itself.

Note

This may be renamed to “dh” in the future.

h_units

property type: h_units:Enum(‘screen’, ‘data’)

retry_attempts

property type: retry_attempts:Int

Number of attempts to retry loading the images from the specified URL. Default is zero.

retry_timeout

property type: retry_timeout:Int

Timeout (in ms) between retry attempts to load the image from the specified URL. Default is zero ms.

url

property type: url:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The URLs to retrieve images from.

Note

The actual retrieving and loading of the images happens on the client.

w

property type: w:DistanceSpec(units_default=’data’)

The widths of the plot regions that the images will occupy.

Note

This is not the number of pixels that an image is wide. That number is fixed by the image itself.

Note

This may be renamed to “dw” in the future.

w_units

property type: w_units:Enum(‘screen’, ‘data’)

x

property type: x:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates to locate the image anchors.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates to locate the image anchors.

JSON Prototype
{
  "anchor": "top_left",
  "angle": {
    "units": "rad",
    "value": 0
  },
  "dilate": false,
  "global_alpha": 1.0,
  "h": null,
  "id": "221a3154-fa8c-4021-a833-2da20ae26643",
  "name": null,
  "retry_attempts": 0,
  "retry_timeout": 0,
  "tags": [],
  "url": null,
  "visible": true,
  "w": null,
  "x": null,
  "y": null
}
class Line(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render a single line.

Note

The Line glyph is different from most other glyphs in that the vector of values only produces one glyph on the Plot.

Example

source: tests/glyphs/Line.py

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line alpha values for the line.

line_cap

property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)

The line cap values for the line.

line_color

property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The line color values for the line.

line_dash

property type: line_dash:DashPattern

The line dash values for the line.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the line.

line_join

property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)

The line join values for the line.

line_width

property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line width values for the line.

x

property type: x:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates for the points of the line.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates for the points of the line.

JSON Prototype
{
  "id": "bf8650a2-e43e-4b6f-b79c-5b344a4bed51",
  "line_alpha": {
    "value": 1.0
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "tags": [],
  "visible": true,
  "x": null,
  "y": null
}
class MultiLine(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render several lines.

Note

The data for the MultiLine glyph is different in that the vector of values is not a vector of scalars. Rather, it is a “list of lists”.

Example

source: tests/glyphs/MultiLine.py

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line alpha values for the lines.

line_cap

property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)

The line cap values for the lines.

line_color

property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The line color values for the lines.

line_dash

property type: line_dash:DashPattern

The line dash values for the lines.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the lines.

line_join

property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)

The line join values for the lines.

line_width

property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line width values for the lines.

xs

property type: xs:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates for all the lines, given as a “list of lists”.

ys

property type: ys:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates for all the lines, given as a “list of lists”.

JSON Prototype
{
  "id": "c9927cfa-4d78-4202-8a0e-99166a254063",
  "line_alpha": {
    "value": 1.0
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "tags": [],
  "visible": true,
  "xs": null,
  "ys": null
}
class Oval(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render ovals.

Note

This glyph renders ovals using Bézier curves, which are similar, but not identical to ellipses.

Example

source: tests/glyphs/Oval.py

angle

property type: angle:AngleSpec(units_default=’rad’)

The angle the ovals are rotated from horizontal. [rad]

angle_units

property type: angle_units:Enum(‘deg’, ‘rad’)

fill_alpha

property type: fill_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The fill alpha values for the ovals.

fill_color

property type: fill_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The fill color values for the ovals.

height

property type: height:DistanceSpec(units_default=’data’)

The overall height of each oval.

height_units

property type: height_units:Enum(‘screen’, ‘data’)

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line alpha values for the ovals.

line_cap

property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)

The line cap values for the ovals.

line_color

property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The line color values for the ovals.

line_dash

property type: line_dash:DashPattern

The line dash values for the ovals.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the ovals.

line_join

property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)

The line join values for the ovals.

line_width

property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line width values for the ovals.

width

property type: width:DistanceSpec(units_default=’data’)

The overall widths of each oval.

width_units

property type: width_units:Enum(‘screen’, ‘data’)

x

property type: x:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of the centers of the ovals.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of the centers of the ovals.

JSON Prototype
{
  "angle": {
    "units": "rad",
    "value": 0.0
  },
  "fill_alpha": {
    "value": 1.0
  },
  "fill_color": {
    "value": "gray"
  },
  "height": null,
  "id": "253dbde4-4123-4184-af66-52349bb858ce",
  "line_alpha": {
    "value": 1.0
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "tags": [],
  "visible": true,
  "width": null,
  "x": null,
  "y": null
}
class Patch(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render a single patch.

Note

The Patch glyph is different from most other glyphs in that the vector of values only produces one glyph on the Plot.

Example

source: tests/glyphs/Patch.py

fill_alpha

property type: fill_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The fill alpha values for the patch.

fill_color

property type: fill_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The fill color values for the patch.

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line alpha values for the patch.

line_cap

property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)

The line cap values for the patch.

line_color

property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The line color values for the patch.

line_dash

property type: line_dash:DashPattern

The line dash values for the patch.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the patch.

line_join

property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)

The line join values for the patch.

line_width

property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line width values for the patch.

x

property type: x:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates for the points of the patch.

Note

A patch may comprise multiple polygons. In this case the x-coordinates for each polygon should be separated by NaN values in the sequence.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates for the points of the patch.

Note

A patch may comprise multiple polygons. In this case the y-coordinates for each polygon should be separated by NaN values in the sequence.

JSON Prototype
{
  "fill_alpha": {
    "value": 1.0
  },
  "fill_color": {
    "value": "gray"
  },
  "id": "0554b9ca-ce7a-4df1-85b4-07c219a9dc05",
  "line_alpha": {
    "value": 1.0
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "tags": [],
  "visible": true,
  "x": null,
  "y": null
}
class Patches(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render several patches.

Note

The data for the Patches glyph is different in that the vector of values is not a vector of scalars. Rather, it is a “list of lists”.

Example

source: tests/glyphs/Patches.py

fill_alpha

property type: fill_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The fill alpha values for the patches.

fill_color

property type: fill_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The fill color values for the patches.

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line alpha values for the patches.

line_cap

property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)

The line cap values for the patches.

line_color

property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The line color values for the patches.

line_dash

property type: line_dash:DashPattern

The line dash values for the patches.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the patches.

line_join

property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)

The line join values for the patches.

line_width

property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line width values for the patches.

xs

property type: xs:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates for all the patches, given as a “list of lists”.

Note

Individual patches may comprise multiple polygons. In this case the x-coordinates for each polygon should be separated by NaN values in the sublists.

ys

property type: ys:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates for all the patches, given as a “list of lists”.

Note

Individual patches may comprise multiple polygons. In this case the y-coordinates for each polygon should be separated by NaN values in the sublists.

JSON Prototype
{
  "fill_alpha": {
    "value": 1.0
  },
  "fill_color": {
    "value": "gray"
  },
  "id": "03e9eb3b-4073-4b3b-807a-35c2bae28adc",
  "line_alpha": {
    "value": 1.0
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "tags": [],
  "visible": true,
  "xs": null,
  "ys": null
}
class Quad(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render axis-aligned quads.

Example

source: tests/glyphs/Quad.py

bottom

property type: bottom:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of the bottom edges.

fill_alpha

property type: fill_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The fill alpha values for the quads.

fill_color

property type: fill_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The fill color values for the quads.

left

property type: left:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of the left edges.

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line alpha values for the quads.

line_cap

property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)

The line cap values for the quads.

line_color

property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The line color values for the quads.

line_dash

property type: line_dash:DashPattern

The line dash values for the quads.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the quads.

line_join

property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)

The line join values for the quads.

line_width

property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line width values for the quads.

right

property type: right:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of the right edges.

top

property type: top:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of the top edges.

JSON Prototype
{
  "bottom": null,
  "fill_alpha": {
    "value": 1.0
  },
  "fill_color": {
    "value": "gray"
  },
  "id": "e458c0e9-97a6-4f08-9a3f-1ff9cac5a4db",
  "left": null,
  "line_alpha": {
    "value": 1.0
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "right": null,
  "tags": [],
  "top": null,
  "visible": true
}
class Quadratic(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render parabolas.

Example

source: tests/glyphs/Quadratic.py

cx

property type: cx:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of the control points.

cy

property type: cy:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of the control points.

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line alpha values for the parabolas.

line_cap

property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)

The line cap values for the parabolas.

line_color

property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The line color values for the parabolas.

line_dash

property type: line_dash:DashPattern

The line dash values for the parabolas.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the parabolas.

line_join

property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)

The line join values for the parabolas.

line_width

property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line width values for the parabolas.

x0

property type: x0:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of the starting points.

x1

property type: x1:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of the ending points.

y0

property type: y0:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of the starting points.

y1

property type: y1:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of the ending points.

JSON Prototype
{
  "cx": null,
  "cy": null,
  "id": "d6f4990b-9ab2-45d1-8002-99bcc61c4e44",
  "line_alpha": {
    "value": 1.0
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "tags": [],
  "visible": true,
  "x0": null,
  "x1": null,
  "y0": null,
  "y1": null
}
class Ray(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render rays.

Example

source: tests/glyphs/Ray.py

angle

property type: angle:AngleSpec(units_default=’rad’)

The angles in radians to extend the rays, as measured from the horizontal.

angle_units

property type: angle_units:Enum(‘deg’, ‘rad’)

length

property type: length:DistanceSpec(units_default=’data’)

The length to extend the ray. Note that this length defaults to screen units.

length_units

property type: length_units:Enum(‘screen’, ‘data’)

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line alpha values for the rays.

line_cap

property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)

The line cap values for the rays.

line_color

property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The line color values for the rays.

line_dash

property type: line_dash:DashPattern

The line dash values for the rays.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the rays.

line_join

property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)

The line join values for the rays.

line_width

property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line width values for the rays.

x

property type: x:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates to start the rays.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates to start the rays.

JSON Prototype
{
  "angle": null,
  "id": "cfc0edaa-9860-440f-a247-44dc21cb84eb",
  "length": null,
  "line_alpha": {
    "value": 1.0
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "tags": [],
  "visible": true,
  "x": null,
  "y": null
}
class Rect(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render rectangles.

Example

source: tests/glyphs/Rect.py

angle

property type: angle:AngleSpec(units_default=’rad’)

The angles to rotate the rectangles, as measured from the horizontal.

angle_units

property type: angle_units:Enum(‘deg’, ‘rad’)

dilate

property type: dilate:Bool

Whether to always round fractional pixel locations in such a way as to make the rectangles bigger.

This setting may be useful if pixel rounding errors are causing rectangles to have a gap between them, when they should appear flush.

fill_alpha

property type: fill_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The fill alpha values for the rectangles.

fill_color

property type: fill_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The fill color values for the rectangles.

height

property type: height:DistanceSpec(units_default=’data’)

The overall heights of the rectangles.

height_units

property type: height_units:Enum(‘screen’, ‘data’)

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line alpha values for the rectangles.

line_cap

property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)

The line cap values for the rectangles.

line_color

property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The line color values for the rectangles.

line_dash

property type: line_dash:DashPattern

The line dash values for the rectangles.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the rectangles.

line_join

property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)

The line join values for the rectangles.

line_width

property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line width values for the rectangles.

width

property type: width:DistanceSpec(units_default=’data’)

The overall widths of the rectangles.

width_units

property type: width_units:Enum(‘screen’, ‘data’)

x

property type: x:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of the centers of the rectangles.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of the centers of the rectangles.

JSON Prototype
{
  "angle": {
    "units": "rad",
    "value": 0.0
  },
  "dilate": false,
  "fill_alpha": {
    "value": 1.0
  },
  "fill_color": {
    "value": "gray"
  },
  "height": null,
  "id": "f4c9dbc5-0b90-4e0d-bc78-fb825c42d450",
  "line_alpha": {
    "value": 1.0
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "tags": [],
  "visible": true,
  "width": null,
  "x": null,
  "y": null
}
class Segment(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render segments.

Example

source: tests/glyphs/Segment.py

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line alpha values for the segments.

line_cap

property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)

The line cap values for the segments.

line_color

property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The line color values for the segments.

line_dash

property type: line_dash:DashPattern

The line dash values for the segments.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the segments.

line_join

property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)

The line join values for the segments.

line_width

property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line width values for the segments.

x0

property type: x0:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of the starting points.

x1

property type: x1:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of the ending points.

y0

property type: y0:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of the starting points.

y1

property type: y1:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of the ending points.

JSON Prototype
{
  "id": "c1e186ed-a416-4030-8b7e-92109d2a5061",
  "line_alpha": {
    "value": 1.0
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "tags": [],
  "visible": true,
  "x0": null,
  "x1": null,
  "y0": null,
  "y1": null
}
class Text(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render text.

Example

source: tests/glyphs/Text.py

angle

property type: angle:AngleSpec(units_default=’rad’)

The angles to rotate the text, as measured from the horizontal.

angle_units

property type: angle_units:Enum(‘deg’, ‘rad’)

text

property type: text:StringSpec(String, Dict(String, Either(String, List(String))), List(String))

The text values to render.

text_align

property type: text_align:Enum(‘left’, ‘right’, ‘center’)

The text align values for the text.

text_alpha

property type: text_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The text alpha values for the text.

text_baseline

property type: text_baseline:Enum(‘top’, ‘middle’, ‘bottom’, ‘alphabetic’, ‘hanging’)

The text baseline values for the text.

text_color

property type: text_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The text color values for the text.

text_font

property type: text_font:String

The text font values for the text.

text_font_size

property type: text_font_size:FontSizeSpec(String, Dict(String, Either(String, List(String))), List(String))

The text font size values for the text.

text_font_style

property type: text_font_style:Enum(‘normal’, ‘italic’, ‘bold’)

The text font style values for the text.

x

property type: x:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates to locate the text anchors.

x_offset

property type: x_offset:NumberSpec(String, Dict(String, Either(String, Float)), Float)

Offset values to apply to the x-coordinates.

This is useful, for instance, if it is desired to “float” text a fixed distance in screen units from a given data position.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates to locate the text anchors.

y_offset

property type: y_offset:NumberSpec(String, Dict(String, Either(String, Float)), Float)

Offset values to apply to the y-coordinates.

This is useful, for instance, if it is desired to “float” text a fixed distance in screen units from a given data position.

JSON Prototype
{
  "angle": {
    "units": "rad",
    "value": 0
  },
  "id": "2ce6ba22-b45e-41a7-9305-1120710bbdf4",
  "name": null,
  "tags": [],
  "text": {
    "field": "text"
  },
  "text_align": "left",
  "text_alpha": {
    "value": 1.0
  },
  "text_baseline": "bottom",
  "text_color": {
    "value": "#444444"
  },
  "text_font": "helvetica",
  "text_font_size": {
    "value": "12pt"
  },
  "text_font_style": "normal",
  "visible": true,
  "x": null,
  "x_offset": {
    "value": 0
  },
  "y": null,
  "y_offset": {
    "value": 0
  }
}
class Wedge(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render wedges.

Example

source: tests/glyphs/Wedge.py

direction

property type: direction:Enum(‘clock’, ‘anticlock’)

Which direction to stroke between the start and end angles.

end_angle

property type: end_angle:AngleSpec(units_default=’rad’)

The angles to end the wedges, as measured from the horizontal.

end_angle_units

property type: end_angle_units:Enum(‘deg’, ‘rad’)

fill_alpha

property type: fill_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The fill alpha values for the wedges.

fill_color

property type: fill_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The fill color values for the wedges.

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line alpha values for the wedges.

line_cap

property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)

The line cap values for the wedges.

line_color

property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)

The line color values for the wedges.

line_dash

property type: line_dash:DashPattern

The line dash values for the wedges.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the wedges.

line_join

property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)

The line join values for the wedges.

line_width

property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The line width values for the wedges.

radius

property type: radius:DistanceSpec(units_default=’data’)

Radii of the wedges.

radius_units

property type: radius_units:Enum(‘screen’, ‘data’)

start_angle

property type: start_angle:AngleSpec(units_default=’rad’)

The angles to start the wedges, as measured from the horizontal.

start_angle_units

property type: start_angle_units:Enum(‘deg’, ‘rad’)

x

property type: x:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The x-coordinates of the points of the wedges.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Float)), Float)

The y-coordinates of the points of the wedges.

JSON Prototype
{
  "direction": "anticlock",
  "end_angle": null,
  "fill_alpha": {
    "value": 1.0
  },
  "fill_color": {
    "value": "gray"
  },
  "id": "c2df6c6d-7733-4544-8444-f18df1a4b36d",
  "line_alpha": {
    "value": 1.0
  },
  "line_cap": "butt",
  "line_color": {
    "value": "black"
  },
  "line_dash": [],
  "line_dash_offset": 0,
  "line_join": "miter",
  "line_width": {
    "value": 1
  },
  "name": null,
  "radius": null,
  "start_angle": null,
  "tags": [],
  "visible": true,
  "x": null,
  "y": null
}