bokeh.models.markers¶
Display a variety of simple scatter marker shapes whose attributes
can be associated with data columns from
ColumnDataSource
objects.
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")
.
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:
By definition, all markers accept the following set of properties:
x
,y
positionsize
in pixelsline
,fill
, andhatch
propertiesangle
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.
Note
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.
-
class
Marker
(*args, **kwargs)[source]¶ 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 marker types (asterisk, cross, x) only draw lines. For these markers, the fill values are simply ignored.
Note
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.
-
hatch_extra
¶ -
The hatch extra values for the markers.
-
hatch_pattern
¶ - Property type
HatchPatternSpec
- Default value
None
The hatch pattern values for the markers.
-
hatch_scale
¶ - Property type
- Default value
12.0
The hatch scale values for the markers.
-
hatch_weight
¶ - Property type
- Default value
1.0
The hatch weight values for the markers.
-
hit_dilation
¶ - Property type
- Default value
1.0
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_cap
¶ - Property type
LineCapSpec
- Default value
'butt'
The line cap values for the markers.
-
line_dash
¶ - Property type
DashPatternSpec
- Default value
[]
The line dash values for the markers.
-
line_dash_offset
¶ - Property type
IntSpec
- Default value
0
The line dash offset values for the markers.
-
line_join
¶ - Property type
LineJoinSpec
- Default value
'bevel'
The line join values for the markers.
-
line_width
¶ - Property type
- Default value
1
The line width values for the markers.
-
size
¶ - Property type
- Default value
4
The size (diameter) values for the markers in screen space units.
-
x
¶ - Property type
- Default value
{'field': 'x'}
The x-axis coordinates for the center of the markers.
-
y
¶ - Property type
- Default value
{'field': 'y'}
The y-axis coordinates for the center of the markers.
-
- bokeh.models.markers.Asterisk
- bokeh.models.markers.Circle
- bokeh.models.markers.CircleCross
- bokeh.models.markers.CircleDot
- bokeh.models.markers.CircleX
- bokeh.models.markers.CircleY
- bokeh.models.markers.Cross
- bokeh.models.markers.Dash
- bokeh.models.markers.Diamond
- bokeh.models.markers.DiamondCross
- bokeh.models.markers.DiamondDot
- bokeh.models.markers.Dot
- bokeh.models.markers.Hex
- bokeh.models.markers.HexDot
- bokeh.models.markers.InvertedTriangle
- bokeh.models.markers.Plus
- bokeh.models.markers.Square
- bokeh.models.markers.SquareCross
- bokeh.models.markers.SquareDot
- bokeh.models.markers.SquarePin
- bokeh.models.markers.SquareX
- bokeh.models.markers.Star
- bokeh.models.markers.StarDot
- bokeh.models.markers.Triangle
- bokeh.models.markers.TriangleDot
- bokeh.models.markers.TrianglePin
- bokeh.models.markers.X
- bokeh.models.markers.Y