bokeh.models.markers
¶
Glyph renderer models for displaying simple scatter-type markers on Bokeh plots.
-
class
Asterisk
(**kwargs)¶ Bases:
bokeh.models.markers.Marker
Render asterisk ‘*’ markers.
Example
source: tests/glyphs/Asterisk.py
-
class
Circle
(**kwargs)¶ Bases:
bokeh.models.markers.Marker
Render circle markers.
Example
source: tests/glyphs/Circle.py
-
radius
¶ property type: radius:DistanceSpec(units_default=’data’)
The radius values for circle markers (in “data space” units, by default).
Note
Circle markers are slightly unusual in that they support specifying a radius in addition to a size. Only one of
radius
orsize
should be given.Warning
Note that
Circle
glyphs are always drawn as circles on the screen, even in cases where the data space aspect ratio is not 1-1. In all cases where radius values are specified, the “distance” for the radius is measured along the dimension specified byradius_dimension
. If the aspect ratio is very large or small, the drawn circles may appear much larger or smaller than expected. See issue 626 for more information.
-
radius_dimension
¶ property type: radius_dimension:Enum(‘x’, ‘y’)
What dimension to measure circle radii along.
When the data space aspect ratio is not 1-1, then the size of the drawn circles depends on what direction is used to measure the “distance” of the radius. This property allows that direction to be controlled.
-
radius_units
¶ property type: radius_units:Enum(‘screen’, ‘data’)
-
-
class
CircleCross
(**kwargs)¶ Bases:
bokeh.models.markers.Marker
Render circle markers with a ‘+’ cross through the center.
Example
source: tests/glyphs/CircleCross.py
-
class
CircleX
(**kwargs)¶ Bases:
bokeh.models.markers.Marker
Render circle markers with an ‘X’ cross through the center.
Example
source: tests/glyphs/CircleX.py
-
class
Cross
(**kwargs)¶ Bases:
bokeh.models.markers.Marker
Render ‘+’ cross markers.
Example
source: tests/glyphs/Cross.py
-
class
Diamond
(**kwargs)¶ Bases:
bokeh.models.markers.Marker
Render diamond markers.
Example
source: tests/glyphs/Diamond.py
-
class
DiamondCross
(**kwargs)¶ Bases:
bokeh.models.markers.Marker
Render diamond markers with a ‘+’ cross through the center.
Example
source: tests/glyphs/DiamondCross.py
-
class
InvertedTriangle
(**kwargs)¶ Bases:
bokeh.models.markers.Marker
Render upside-down triangle markers.
Example
source: tests/glyphs/InvertedTriangle.py
-
class
Marker
(**kwargs)¶ Bases:
bokeh.models.glyphs.Glyph
Base class for glyphs that are simple markers with line and fill properties, located at an (x, y) location with a specified size.
Note
For simplicity, all markers have both line and fill properties declared, however some markers (Asterisk, Cross, X) only draw lines. For these markers, the fill values are simply ignored.
-
angle
¶ property type: angle:AngleSpec(units_default=’rad’)
The angles to rotate the markers.
-
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 markers.
-
fill_color
¶ property type: fill_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)
The fill color values for the markers.
-
line_alpha
¶ property type: line_alpha:NumberSpec(String, Dict(String, Either(String, Float)), Float)
The line alpha values for the markers.
-
line_cap
¶ property type: line_cap:Enum(‘butt’, ‘round’, ‘square’)
The line cap values for the markers.
-
line_color
¶ property type: line_color:ColorSpec(String, Dict(String, Either(String, Color)), Color)
The line color values for the markers.
-
line_dash
¶ property type: line_dash:DashPattern
The line dash values for the markers.
-
line_dash_offset
¶ property type: line_dash_offset:Int
The line dash offset values for the markers.
-
line_join
¶ property type: line_join:Enum(‘miter’, ‘round’, ‘bevel’)
The line join values for the markers.
-
line_width
¶ property type: line_width:NumberSpec(String, Dict(String, Either(String, Float)), Float)
The line width values for the markers.
-
size
¶ property type: size:ScreenDistanceSpec(String, Dict(String, Either(String, Float)), Float)
The size (diameter) values for the markers in screen space units.
-
x
¶ property type: x:NumberSpec(String, Dict(String, Either(String, Float)), Float)
The x-axis coordinates for the center of the markers.
-
y
¶ property type: y:NumberSpec(String, Dict(String, Either(String, Float)), Float)
The y-axis coordinates for the center of the markers.
-
-
class
Square
(**kwargs)¶ Bases:
bokeh.models.markers.Marker
Render a square marker, optionally rotated.
Example
source: tests/glyphs/Square.py
-
class
SquareCross
(**kwargs)¶ Bases:
bokeh.models.markers.Marker
Render square markers with a ‘+’ cross through the center.
Example
source: tests/glyphs/SquareCross.py
-
class
SquareX
(**kwargs)¶ Bases:
bokeh.models.markers.Marker
Render square markers with an ‘X’ cross through the center.
Example
source: tests/glyphs/SquareX.py
-
class
Triangle
(**kwargs)¶ Bases:
bokeh.models.markers.Marker
Render triangle markers.
Example
source: tests/glyphs/Triangle.py
-
class
X
(**kwargs)¶ Bases:
bokeh.models.markers.Marker
Render a ‘X’ cross markers.
Example
source: tests/glyphs/X.py