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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The fill alpha values for the annular wedges.

fill_color

property type: fill_color:ColorSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

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

y

property type: y:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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": "55fa5de8-c4e6-4392-bb04-c6ff6b70b672",
  "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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The fill alpha values for the annuli.

fill_color

property type: fill_color:ColorSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The x-coordinates of the center of the annuli.

y

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

The y-coordinates of the center of the annuli.

JSON Prototype
{
  "fill_alpha": {
    "value": 1.0
  },
  "fill_color": {
    "value": "gray"
  },
  "id": "045264e7-735e-4c94-9e3f-2cea13c90df5",
  "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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The x-coordinates of the center of the arcs.

y

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

The y-coordinates of the center of the arcs.

JSON Prototype
{
  "direction": "anticlock",
  "end_angle": null,
  "id": "507332d4-a44b-4c1c-a112-c652d7fd971a",
  "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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The x-coordinates of first control points.

cx1

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

The x-coordinates of second control points.

cy0

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

The y-coordinates of first control points.

cy1

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

The y-coordinates of second control points.

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The line width values for the Bézier curves.

x0

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

The x-coordinates of the starting points.

x1

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

The x-coordinates of the ending points.

y0

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

The y-coordinates of the starting points.

y1

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

The y-coordinates of the ending points.

JSON Prototype
{
  "cx0": null,
  "cx1": null,
  "cy0": null,
  "cy1": null,
  "id": "244ac181-b753-4e50-b0ec-70b380e30eb6",
  "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 Ellipse(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render ellipses.

Example

source: tests/glyphs/Ellipse.py

angle

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

The angle the ellipses 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The fill alpha values for the ovals.

fill_color

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

The fill color values for the ovals.

height

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

The heights of each ellipse.

height_units

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

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The line width values for the ovals.

width

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

The widths of each ellipse.

width_units

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

x

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

The x-coordinates of the centers of the ellipses.

y

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

The y-coordinates of the centers of the ellipses.

JSON Prototype
{
  "angle": {
    "units": "rad",
    "value": 0.0
  },
  "fill_alpha": {
    "value": 1.0
  },
  "fill_color": {
    "value": "gray"
  },
  "height": null,
  "id": "669142bc-2458-47c3-8e0b-322dd5780934",
  "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 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": "bbccb3a2-e643-4cfe-86d8-a34090f7edf8",
  "name": null,
  "tags": [],
  "visible": true
}
class HBar(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render horizontal bars, given a center coordinate, height and (left, right) coordinates.

Example

source: tests/glyphs/HBar.py

fill_alpha

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

The fill alpha values for the horizontal bars.

fill_color

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

The fill color values for the horizontal bars.

height

property type: height:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), Float)), Float)

The heights of the vertical bars.

left

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

The x-coordinates of the left edges.

line_alpha

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

The line alpha values for the horizontal bars.

line_cap

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

The line cap values for the horizontal bars.

line_color

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

The line color values for the horizontal bars.

line_dash

property type: line_dash:DashPattern

The line dash values for the horizontal bars.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the horizontal bars.

line_join

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

The line join values for the horizontal bars.

line_width

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

The line width values for the horizontal bars.

right

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

The x-coordinates of the right edges.

y

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

The y-coordinates of the centers of the horizontal bars.

JSON Prototype
{
  "fill_alpha": {
    "value": 1.0
  },
  "fill_color": {
    "value": "gray"
  },
  "height": null,
  "id": "cd119b61-8974-4842-8095-be80dbf7ce3d",
  "left": {
    "value": 0
  },
  "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": [],
  "visible": true,
  "y": null
}
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(ColorMapper)

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, Instance(Transform), Instance(ColorMapper), Float)), Float)

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

x

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

The x-coordinates to locate the image anchors.

y

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

The y-coordinates to locate the image anchors.

JSON Prototype
{
  "color_mapper": {
    "id": "7cf42d4d-6947-4602-809f-33d0fd9a25cb",
    "type": "LinearColorMapper"
  },
  "dh": null,
  "dilate": false,
  "dw": null,
  "id": "693a5fd7-44d1-46ff-9ce4-8f8f1c0e0df4",
  "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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The arrays of RGBA data for the images.

rows

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

The numbers of rows in the images

x

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

The x-coordinates to locate the image anchors.

y

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

The y-coordinates to locate the image anchors.

JSON Prototype
{
  "cols": null,
  "dh": null,
  "dilate": false,
  "dw": null,
  "id": "dd6f88f4-6876-47a1-aab5-514edd056974",
  "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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The x-coordinates to locate the image anchors.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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": "b74929a2-bf33-4d72-87ba-d0f95680c007",
  "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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The line width values for the line.

x

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

The x-coordinates for the points of the line.

y

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

The y-coordinates for the points of the line.

JSON Prototype
{
  "id": "b460ad53-8844-40cf-a99c-22e82a57a762",
  "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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The line width values for the lines.

xs

property type: xs:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

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

JSON Prototype
{
  "id": "864d4426-f776-49f1-90ac-5648e1da21c2",
  "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. In particular, widths equal to heights will not render circles. Use the Ellipse glyph for that.

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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The fill alpha values for the ovals.

fill_color

property type: fill_color:ColorSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The x-coordinates of the centers of the ovals.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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": "a3fd1482-9535-42d8-9b8e-f765b5cab5fc",
  "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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The fill alpha values for the patch.

fill_color

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

The fill color values for the patch.

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The line width values for the patch.

x

property type: x:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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": "26ed37c7-262f-4508-9f03-a22039c971fb",
  "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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The fill alpha values for the patches.

fill_color

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

The fill color values for the patches.

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The line width values for the patches.

xs

property type: xs:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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": "f48f164b-558c-4ea2-b76a-6fa640f5dccc",
  "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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The y-coordinates of the bottom edges.

fill_alpha

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

The fill alpha values for the quads.

fill_color

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

The fill color values for the quads.

left

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

The x-coordinates of the left edges.

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The line width values for the quads.

right

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

The x-coordinates of the right edges.

top

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

The y-coordinates of the top edges.

JSON Prototype
{
  "bottom": null,
  "fill_alpha": {
    "value": 1.0
  },
  "fill_color": {
    "value": "gray"
  },
  "id": "027943c7-bf14-47be-a001-0d89a7fd9d7e",
  "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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The x-coordinates of the control points.

cy

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

The y-coordinates of the control points.

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The line width values for the parabolas.

x0

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

The x-coordinates of the starting points.

x1

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

The x-coordinates of the ending points.

y0

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

The y-coordinates of the starting points.

y1

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

The y-coordinates of the ending points.

JSON Prototype
{
  "cx": null,
  "cy": null,
  "id": "86a1fe32-684f-407f-b304-77b0ad6a001d",
  "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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The line width values for the rays.

x

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

The x-coordinates to start the rays.

y

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

The y-coordinates to start the rays.

JSON Prototype
{
  "angle": null,
  "id": "5208eb06-1c13-4ad8-a586-da0aadb94f56",
  "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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The fill alpha values for the rectangles.

fill_color

property type: fill_color:ColorSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The x-coordinates of the centers of the rectangles.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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": "26a8eca8-b3b0-413a-af24-f47ff8a78ed8",
  "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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The line width values for the segments.

x0

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

The x-coordinates of the starting points.

x1

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

The x-coordinates of the ending points.

y0

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

The y-coordinates of the starting points.

y1

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

The y-coordinates of the ending points.

JSON Prototype
{
  "id": "a71e5c5d-aed4-45d3-bc5e-3f996c3de7d5",
  "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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The text alpha values for the text.

text_baseline

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

The text baseline values for the text.

text_color

property type: text_color:ColorSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The x-coordinates to locate the text anchors.

x_offset

property type: x_offset:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The y-coordinates to locate the text anchors.

y_offset

property type: y_offset:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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": "c003677b-61a9-42a3-a2ea-b3ab68733c6d",
  "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 VBar(**kwargs)

Bases: bokeh.models.glyphs.Glyph

Render vertical bars, given a center coordinate, width and (top, bottom) coordinates.

Example

source: tests/glyphs/VBar.py

bottom

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

The y-coordinates of the bottom edges.

fill_alpha

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

The fill alpha values for the vertical bars.

fill_color

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

The fill color values for the vertical bars.

line_alpha

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

The line alpha values for the vertical bars.

line_cap

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

The line cap values for the vertical bars.

line_color

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

The line color values for the vertical bars.

line_dash

property type: line_dash:DashPattern

The line dash values for the vertical bars.

line_dash_offset

property type: line_dash_offset:Int

The line dash offset values for the vertical bars.

line_join

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

The line join values for the vertical bars.

line_width

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

The line width values for the vertical bars.

top

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

The y-coordinates of the top edges.

width

property type: width:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), Float)), Float)

The widths of the vertical bars.

x

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

The x-coordinates of the centers of the vertical bars.

JSON Prototype
{
  "bottom": {
    "value": 0
  },
  "fill_alpha": {
    "value": 1.0
  },
  "fill_color": {
    "value": "gray"
  },
  "id": "f62d2287-d1af-460f-aa64-126f1c8156eb",
  "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": [],
  "top": null,
  "visible": true,
  "width": null,
  "x": null
}
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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The fill alpha values for the wedges.

fill_color

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

The fill color values for the wedges.

line_alpha

property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), 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, Instance(Transform), Instance(ColorMapper), Float)), Float)

The x-coordinates of the points of the wedges.

y

property type: y:NumberSpec(String, Dict(String, Either(String, Instance(Transform), Instance(ColorMapper), 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": "6dbac0e2-f2d4-412f-bfaf-9fb633264c4f",
  "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
}