Display a variety of simple scatter marker shapes whose attributes can be associated with data columns from ColumnDataSource objects.
ColumnDataSource
Note
The individual marker classes in this module are deprecated since Bokeh 2.3.0. Please replace all occurrences of Marker models with Scatter glyphs. For example: instead of Asterisk(), use Scatter(marker="asterisk").
Marker
Scatter
Asterisk()
Scatter(marker="asterisk")
For backwards compatibility, all markers in this module currently link to their respective replacements using the Scatter glyph.
The full list of markers accessible through this module:
Circle
CircleCross()
CircleDot()
CircleY()
CircleX()
Cross()
Dash()
Diamond()
DiamondCross()
DiamondDot()
Dot()
Hex()
HexDot()
InvertedTriangle()
Plus()
Square()
SquareCross()
SquareDot()
SquarePin()
SquareX()
Star()
StarDot()
Triangle()
TriangleDot()
TrianglePin()
X()
Y()
By definition, all markers accept the following set of properties:
x, y position
x
y
size in pixels
size
line, fill, and hatch properties
line
fill
hatch
angle
The asterisk, cross, dash`, ``dot, x, and y are rendered as lines. Therefore, those markers ignore any values that are passed to the fill and hatch properties.
asterisk
cross
dash`, ``dot
When you draw circle markers with Scatter, you can only assign a size in screen units (by passing a number of pixels to the size argument). In case you want to define the radius of circles in data units, use the Circle glyph instead of the Scatter glyph with a circle marker.
circle
Base class for glyphs that are simple markers with line and fill properties, located at an (x, y) location with a specified size.
For simplicity, all markers have both line and fill properties declared, however some marker types (asterisk, cross, x) only draw lines. For these markers, the fill values are simply ignored.
This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.
AngleSpec
0.0
The angles to rotate the markers.
fill_alpha
AlphaSpec
1.0
The fill alpha values for the markers.
fill_color
ColorSpec
'gray'
The fill color values for the markers.
hatch_alpha
The hatch alpha values for the markers.
hatch_color
'black'
The hatch color values for the markers.
hatch_extra
Dict(String, Instance(Texture))
Dict
String
Instance
Texture
{}
The hatch extra values for the markers.
hatch_pattern
HatchPatternSpec
None
The hatch pattern values for the markers.
hatch_scale
NumberSpec
12.0
The hatch scale values for the markers.
hatch_weight
The hatch weight values for the markers.
hit_dilation
Size
The factor by which to dilate the hit radius which is responsible for defining the range in which a marker responds to interactions with the Hover and Tap tools.
line_alpha
The line alpha values for the markers.
line_cap
LineCapSpec
'butt'
The line cap values for the markers.
line_color
The line color values for the markers.
line_dash
DashPatternSpec
[]
The line dash values for the markers.
line_dash_offset
IntSpec
0
The line dash offset values for the markers.
line_join
LineJoinSpec
'bevel'
The line join values for the markers.
line_width
1
The line width values for the markers.
ScreenDistanceSpec
4
The size (diameter) values for the markers in screen space units.
{'field': 'x'}
The x-axis coordinates for the center of the markers.
{'field': 'y'}
The y-axis coordinates for the center of the markers.