bokeh.plotting¶
-
figure
(**kwargs)[source]¶ Create a new
Figure
for plotting.In addition to the standard
Figure
property values (e.g.plot_width
orsizing_mode
) the following additional options can be passed as well:Options¶
- active_drag
type:
Either
(Auto
,String
,Instance
(Drag
) )Which drag tool should initially be active.
- active_inspect
type:
Either
(Auto
,String
,Instance
(Inspection
),Seq
(Instance
(Inspection
) ) )Which drag tool should initially be active.
- active_scroll
type:
Either
(Auto
,String
,Instance
(Scroll
) )Which scroll tool should initially be active.
- active_tap
type:
Either
(Auto
,String
,Instance
(Tap
) )Which tap tool should initially be active.
- tools
type:
Either
(String
,Seq
(Either
(String
,Instance
(Tool
) ) ) )Tools the plot should start with.
- x_axis_label
type:
String
A label for the x-axis.
- x_axis_location
type:
Enum
(VerticalLocation
)Where the x-axis should be located.
- x_axis_type
type:
Either
(Auto
,Enum
( Enumeration(linear, log, datetime) ) )The type of the x-axis.
- x_minor_ticks
-
Number of minor ticks between adjacent x-axis major ticks.
- x_range
type:
Either
(Tuple
(Float
,Float
),Seq
(String
),Instance
(Range
) )Customize the x-range of the plot.
- y_axis_label
type:
String
A label for the y-axis.
- y_axis_location
type:
Enum
(HorizontalLocation
)Where the y-axis should be located.
- y_axis_type
type:
Either
(Auto
,Enum
( Enumeration(linear, log, datetime) ) )The type of the y-axis.
- y_minor_ticks
-
Number of minor ticks between adjacent y-axis major ticks.
- y_range
type:
Either
(Tuple
(Float
,Float
),Seq
(String
),Instance
(Range
) )Customize the x-range of the plot.
Returns: Figure
-
class
Figure
(*arg, **kw)[source]¶ A subclass of
Plot
that simplifies plot creation with default axes, grids, tools, etc.In addition to all the Bokeh model property attributes documented below, the
Figure
initializer also accepts the following options, which can help simplify configuration:Options¶
- active_drag
type:
Either
(Auto
,String
,Instance
(Drag
) )Which drag tool should initially be active.
- active_inspect
type:
Either
(Auto
,String
,Instance
(Inspection
),Seq
(Instance
(Inspection
) ) )Which drag tool should initially be active.
- active_scroll
type:
Either
(Auto
,String
,Instance
(Scroll
) )Which scroll tool should initially be active.
- active_tap
type:
Either
(Auto
,String
,Instance
(Tap
) )Which tap tool should initially be active.
- tools
type:
Either
(String
,Seq
(Either
(String
,Instance
(Tool
) ) ) )Tools the plot should start with.
- x_axis_label
type:
String
A label for the x-axis.
- x_axis_location
type:
Enum
(VerticalLocation
)Where the x-axis should be located.
- x_axis_type
type:
Either
(Auto
,Enum
( Enumeration(linear, log, datetime) ) )The type of the x-axis.
- x_minor_ticks
-
Number of minor ticks between adjacent x-axis major ticks.
- x_range
type:
Either
(Tuple
(Float
,Float
),Seq
(String
),Instance
(Range
) )Customize the x-range of the plot.
- y_axis_label
type:
String
A label for the y-axis.
- y_axis_location
type:
Enum
(HorizontalLocation
)Where the y-axis should be located.
- y_axis_type
type:
Either
(Auto
,Enum
( Enumeration(linear, log, datetime) ) )The type of the y-axis.
- y_minor_ticks
-
Number of minor ticks between adjacent y-axis major ticks.
- y_range
type:
Either
(Tuple
(Float
,Float
),Seq
(String
),Instance
(Range
) )Customize the x-range of the plot.
-
annular_wedge
(x, y, inner_radius, outer_radius, start_angle, end_angle, direction='anticlock', **kwargs)¶ Configure and add annularwedge glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-coordinates of the center of the annular wedges. (default None)
- y (DataSpecPropertyDescriptor) – The y-coordinates of the center of the annular wedges. (default None)
- inner_radius (UnitsSpecPropertyDescriptor) – The inner radii of the annular wedges. (default None)
- outer_radius (UnitsSpecPropertyDescriptor) – The outer radii of the annular wedges. (default None)
- start_angle (UnitsSpecPropertyDescriptor) – The angles to start the annular wedges, as measured from the horizontal. (default None)
- end_angle (UnitsSpecPropertyDescriptor) – The angles to end the annular wedges, as measured from the horizontal. (default None)
- direction (BasicPropertyDescriptor) – Which direction to stroke between the start and end angles. (default ‘anticlock’)
Keyword Arguments: - end_angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the annular wedges. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the annular wedges. (default ‘gray’)
- inner_radius_units (Enum('screen', 'data')) – (default ‘data’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the annular wedges. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the annular wedges. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the annular wedges. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the annular wedges. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the annular wedges. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the annular wedges. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the annular wedges. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- outer_radius_units (Enum('screen', 'data')) – (default ‘data’)
- start_angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer
-
annulus
(x, y, inner_radius, outer_radius, **kwargs)¶ Configure and add annulus glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-coordinates of the center of the annuli. (default None)
- y (DataSpecPropertyDescriptor) – The y-coordinates of the center of the annuli. (default None)
- inner_radius (UnitsSpecPropertyDescriptor) – The inner radii of the annuli. (default None)
- outer_radius (UnitsSpecPropertyDescriptor) – The outer radii of the annuli. (default None)
Keyword Arguments: - fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the annuli. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the annuli. (default ‘gray’)
- inner_radius_units (Enum('screen', 'data')) – (default ‘data’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the annuli. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the annuli. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the annuli. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the annuli. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the annuli. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the annuli. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the annuli. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- outer_radius_units (Enum('screen', 'data')) – (default ‘data’)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.annulus(x=[1, 2, 3], y=[1, 2, 3], color="#7FC97F", inner_radius=0.2, outer_radius=0.5) show(plot)
-
arc
(x, y, radius, start_angle, end_angle, direction='anticlock', **kwargs)¶ Configure and add arc glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-coordinates of the center of the arcs. (default None)
- y (DataSpecPropertyDescriptor) – The y-coordinates of the center of the arcs. (default None)
- radius (UnitsSpecPropertyDescriptor) – Radius of the arc. (default None)
- start_angle (UnitsSpecPropertyDescriptor) – The angles to start the arcs, as measured from the horizontal. (default None)
- end_angle (UnitsSpecPropertyDescriptor) – The angles to end the arcs, as measured from the horizontal. (default None)
- direction (BasicPropertyDescriptor) – Which direction to stroke between the start and end angles. (default ‘anticlock’)
Keyword Arguments: - end_angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the arcs. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the arcs. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the arcs. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the arcs. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the arcs. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the arcs. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the arcs. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- radius_units (Enum('screen', 'data')) – (default ‘data’)
- start_angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer
-
asterisk
(x, y, size=4, angle=0.0, **kwargs)¶ Configure and add asterisk glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-axis coordinates for the center of the markers. (default None)
- y (DataSpecPropertyDescriptor) – The y-axis coordinates for the center of the markers. (default None)
- size (DataSpecPropertyDescriptor) – The size (diameter) values for the markers in screen space units. (default 4)
- angle (UnitsSpecPropertyDescriptor) – The angles to rotate the markers. (default 0.0)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the markers. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the markers. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the markers. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the markers. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the markers. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the markers. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the markers. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the markers. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the markers. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.asterisk(x=[1,2,3], y=[1,2,3], size=20, color="#F0027F") show(plot)
-
bezier
(x0, y0, x1, y1, cx0, cy0, cx1, cy1, **kwargs)¶ Configure and add bezier glyphs to this Figure.
Parameters: - x0 (DataSpecPropertyDescriptor) – The x-coordinates of the starting points. (default None)
- y0 (DataSpecPropertyDescriptor) – The y-coordinates of the starting points. (default None)
- x1 (DataSpecPropertyDescriptor) – The x-coordinates of the ending points. (default None)
- y1 (DataSpecPropertyDescriptor) – The y-coordinates of the ending points. (default None)
- cx0 (DataSpecPropertyDescriptor) – The x-coordinates of first control points. (default None)
- cy0 (DataSpecPropertyDescriptor) – The y-coordinates of first control points. (default None)
- cx1 (DataSpecPropertyDescriptor) – The x-coordinates of second control points. (default None)
- cy1 (DataSpecPropertyDescriptor) – The y-coordinates of second control points. (default None)
Keyword Arguments: - js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the Bézier curves. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the Bézier curves. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the Bézier curves. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the Bézier curves. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the Bézier curves. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the Bézier curves. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the Bézier curves. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer
-
circle
(x, y, **kwargs)¶ Configure and add circle glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-axis coordinates for the center of the markers. (default None)
- y (DataSpecPropertyDescriptor) – The y-axis coordinates for the center of the markers. (default None)
Keyword Arguments: - angle (UnitsSpecPropertyDescriptor) – The angles to rotate the markers. (default 0.0)
- angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the markers. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the markers. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the markers. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the markers. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the markers. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the markers. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the markers. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the markers. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the markers. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- radius (UnitsSpecPropertyDescriptor) – The radius values for circle markers (in “data space” units, by default). (default None)
- radius_dimension (BasicPropertyDescriptor) – What dimension to measure circle radii along. (default ‘x’)
- radius_units (Enum('screen', 'data')) – (default ‘data’)
- size (DataSpecPropertyDescriptor) – The size (diameter) values for the markers in screen space units. (default 4)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Note
Only one of
size
orradius
should be provided. Note thatradius
defaults to data units.Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.circle(x=[1, 2, 3], y=[1, 2, 3], size=20) show(plot)
-
circle_cross
(x, y, size=4, angle=0.0, **kwargs)¶ Configure and add circlecross glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-axis coordinates for the center of the markers. (default None)
- y (DataSpecPropertyDescriptor) – The y-axis coordinates for the center of the markers. (default None)
- size (DataSpecPropertyDescriptor) – The size (diameter) values for the markers in screen space units. (default 4)
- angle (UnitsSpecPropertyDescriptor) – The angles to rotate the markers. (default 0.0)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the markers. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the markers. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the markers. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the markers. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the markers. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the markers. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the markers. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the markers. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the markers. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.circle_cross(x=[1,2,3], y=[4,5,6], size=20, color="#FB8072", fill_alpha=0.2, line_width=2) show(plot)
-
circle_x
(x, y, size=4, angle=0.0, **kwargs)¶ Configure and add circlex glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-axis coordinates for the center of the markers. (default None)
- y (DataSpecPropertyDescriptor) – The y-axis coordinates for the center of the markers. (default None)
- size (DataSpecPropertyDescriptor) – The size (diameter) values for the markers in screen space units. (default 4)
- angle (UnitsSpecPropertyDescriptor) – The angles to rotate the markers. (default 0.0)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the markers. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the markers. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the markers. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the markers. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the markers. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the markers. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the markers. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the markers. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the markers. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.circle_x(x=[1, 2, 3], y=[1, 2, 3], size=20, color="#DD1C77", fill_alpha=0.2) show(plot)
-
cross
(x, y, size=4, angle=0.0, **kwargs)¶ Configure and add cross glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-axis coordinates for the center of the markers. (default None)
- y (DataSpecPropertyDescriptor) – The y-axis coordinates for the center of the markers. (default None)
- size (DataSpecPropertyDescriptor) – The size (diameter) values for the markers in screen space units. (default 4)
- angle (UnitsSpecPropertyDescriptor) – The angles to rotate the markers. (default 0.0)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the markers. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the markers. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the markers. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the markers. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the markers. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the markers. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the markers. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the markers. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the markers. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.cross(x=[1, 2, 3], y=[1, 2, 3], size=20, color="#E6550D", line_width=2) show(plot)
-
diamond
(x, y, size=4, angle=0.0, **kwargs)¶ Configure and add diamond glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-axis coordinates for the center of the markers. (default None)
- y (DataSpecPropertyDescriptor) – The y-axis coordinates for the center of the markers. (default None)
- size (DataSpecPropertyDescriptor) – The size (diameter) values for the markers in screen space units. (default 4)
- angle (UnitsSpecPropertyDescriptor) – The angles to rotate the markers. (default 0.0)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the markers. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the markers. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the markers. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the markers. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the markers. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the markers. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the markers. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the markers. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the markers. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.diamond(x=[1, 2, 3], y=[1, 2, 3], size=20, color="#1C9099", line_width=2) show(plot)
-
diamond_cross
(x, y, size=4, angle=0.0, **kwargs)¶ Configure and add diamondcross glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-axis coordinates for the center of the markers. (default None)
- y (DataSpecPropertyDescriptor) – The y-axis coordinates for the center of the markers. (default None)
- size (DataSpecPropertyDescriptor) – The size (diameter) values for the markers in screen space units. (default 4)
- angle (UnitsSpecPropertyDescriptor) – The angles to rotate the markers. (default 0.0)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the markers. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the markers. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the markers. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the markers. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the markers. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the markers. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the markers. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the markers. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the markers. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.diamond_cross(x=[1, 2, 3], y=[1, 2, 3], size=20, color="#386CB0", fill_color=None, line_width=2) show(plot)
-
ellipse
(x, y, width, height, angle=0.0, **kwargs)¶ Configure and add ellipse glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-coordinates of the centers of the ellipses. (default None)
- y (DataSpecPropertyDescriptor) – The y-coordinates of the centers of the ellipses. (default None)
- width (UnitsSpecPropertyDescriptor) – The widths of each ellipse. (default None)
- height (UnitsSpecPropertyDescriptor) – The heights of each ellipse. (default None)
- angle (UnitsSpecPropertyDescriptor) – The angle the ellipses are rotated from horizontal. [rad] (default 0.0)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the ovals. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the ovals. (default ‘gray’)
- height_units (Enum('screen', 'data')) – (default ‘data’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the ovals. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the ovals. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the ovals. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the ovals. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the ovals. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the ovals. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the ovals. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
- width_units (Enum('screen', 'data')) – (default ‘data’)
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.ellipse(x=[1, 2, 3], y=[1, 2, 3], width=30, height=20, color="#386CB0", fill_color=None, line_width=2) show(plot)
-
hbar
(y, height, right, left=0, **kwargs)¶ Configure and add hbar glyphs to this Figure.
Parameters: - y (DataSpecPropertyDescriptor) – The y-coordinates of the centers of the horizontal bars. (default None)
- height (DataSpecPropertyDescriptor) – The heights of the vertical bars. (default None)
- right (DataSpecPropertyDescriptor) – The x-coordinates of the right edges. (default None)
- left (DataSpecPropertyDescriptor) – The x-coordinates of the left edges. (default 0)
Keyword Arguments: - fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the horizontal bars. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the horizontal bars. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the horizontal bars. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the horizontal bars. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the horizontal bars. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the horizontal bars. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the horizontal bars. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the horizontal bars. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the horizontal bars. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.hbar(y=[1, 2, 3], height=0.5, left=0, right=[1,2,3], color="#CAB2D6") show(plot)
-
image
(image, x, y, dw, dh, dilate=False, **kwargs)¶ Configure and add image glyphs to this Figure.
Parameters: - image (DataSpecPropertyDescriptor) – The arrays of scalar data for the images to be colormapped. (default None)
- x (DataSpecPropertyDescriptor) – The x-coordinates to locate the image anchors. (default None)
- y (DataSpecPropertyDescriptor) – The y-coordinates to locate the image anchors. (default None)
- dw (UnitsSpecPropertyDescriptor) – The widths of the plot regions that the images will occupy. (default None)
- dh (UnitsSpecPropertyDescriptor) – The height of the plot region that the image will occupy. (default None)
- dilate (BasicPropertyDescriptor) – Whether to always round fractional pixel locations in such a way as to make the images bigger. (default False)
Keyword Arguments: - color_mapper (BasicPropertyDescriptor) – A
ColorMapper
to use to map the scalar data fromimage
into RGBA values for display. (default None) - dh_units (Enum('screen', 'data')) – (default ‘data’)
- dw_units (Enum('screen', 'data')) – (default ‘data’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- palette (str or list[color value]) – a palette to construct a value for the color mapper property from
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Note
If both
palette
andcolor_mapper
are passed, aValueError
exception will be raised. If neither is passed, then theGreys9
palette will be used as a default.
-
image_rgba
(image, x, y, dw, dh, dilate=False, **kwargs)¶ Configure and add imagergba glyphs to this Figure.
Parameters: - image (DataSpecPropertyDescriptor) – The arrays of RGBA data for the images. (default None)
- x (DataSpecPropertyDescriptor) – The x-coordinates to locate the image anchors. (default None)
- y (DataSpecPropertyDescriptor) – The y-coordinates to locate the image anchors. (default None)
- dw (UnitsSpecPropertyDescriptor) – The widths of the plot regions that the images will occupy. (default None)
- dh (UnitsSpecPropertyDescriptor) – The height of the plot region that the image will occupy. (default None)
- dilate (BasicPropertyDescriptor) – Whether to always round fractional pixel locations in such a way as to make the images bigger. (default False)
Keyword Arguments: - cols (DataSpecPropertyDescriptor) – The numbers of columns in the images (default None)
- dh_units (Enum('screen', 'data')) – (default ‘data’)
- dw_units (Enum('screen', 'data')) – (default ‘data’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- rows (DataSpecPropertyDescriptor) – The numbers of rows in the images (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Note
The
image_rgba
method accepts images as a two-dimensional array of RGBA values (encoded as 32-bit integers).
-
image_url
(url, x, y, w, h, angle=0, global_alpha=1.0, dilate=False, **kwargs)¶ Configure and add imageurl glyphs to this Figure.
Parameters: - url (DataSpecPropertyDescriptor) – The URLs to retrieve images from. (default None)
- x (DataSpecPropertyDescriptor) – The x-coordinates to locate the image anchors. (default None)
- y (DataSpecPropertyDescriptor) – The y-coordinates to locate the image anchors. (default None)
- w (UnitsSpecPropertyDescriptor) – The height of the plot region that the image will occupy in data space. (default None)
- h (UnitsSpecPropertyDescriptor) – The height of the plot region that the image will occupy in data space. (default None)
- angle (UnitsSpecPropertyDescriptor) – The angles to rotate the images, as measured from the horizontal. (default 0)
- global_alpha (BasicPropertyDescriptor) – An overall opacity that each image is rendered with (in addition to any inherent alpha values in the image itself). (default 1.0)
- dilate (BasicPropertyDescriptor) – Whether to always round fractional pixel locations in such a way as to make the images bigger. (default False)
Keyword Arguments: - anchor (BasicPropertyDescriptor) – What position of the image should be anchored at the x, y coordinates. (default ‘top_left’)
- angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- h_units (Enum('screen', 'data')) – (default ‘data’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- retry_attempts (BasicPropertyDescriptor) – Number of attempts to retry loading the images from the specified URL. Default is zero. (default 0)
- retry_timeout (BasicPropertyDescriptor) – Timeout (in ms) between retry attempts to load the image from the specified URL. Default is zero ms. (default 0)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
- w_units (Enum('screen', 'data')) – (default ‘data’)
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer
-
inverted_triangle
(x, y, size=4, angle=0.0, **kwargs)¶ Configure and add invertedtriangle glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-axis coordinates for the center of the markers. (default None)
- y (DataSpecPropertyDescriptor) – The y-axis coordinates for the center of the markers. (default None)
- size (DataSpecPropertyDescriptor) – The size (diameter) values for the markers in screen space units. (default 4)
- angle (UnitsSpecPropertyDescriptor) – The angles to rotate the markers. (default 0.0)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the markers. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the markers. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the markers. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the markers. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the markers. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the markers. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the markers. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the markers. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the markers. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.inverted_triangle(x=[1, 2, 3], y=[1, 2, 3], size=20, color="#DE2D26") show(plot)
-
line
(x, y, **kwargs)¶ Configure and add line glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-coordinates for the points of the line. (default None)
- y (DataSpecPropertyDescriptor) – The y-coordinates for the points of the line. (default None)
Keyword Arguments: - js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the line. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the line. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the line. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the line. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the line. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the line. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the line. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show p = figure(title="line", plot_width=300, plot_height=300) p.line(x=[1, 2, 3, 4, 5], y=[6, 7, 2, 4, 5]) show(p)
-
multi_line
(xs, ys, **kwargs)¶ Configure and add multiline glyphs to this Figure.
Parameters: - xs (DataSpecPropertyDescriptor) – The x-coordinates for all the lines, given as a “list of lists”. (default None)
- ys (DataSpecPropertyDescriptor) – The y-coordinates for all the lines, given as a “list of lists”. (default None)
Keyword Arguments: - js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the lines. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the lines. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the lines. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the lines. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the lines. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the lines. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the lines. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Note
For this glyph, the data is not simply an array of scalars, it is an “array of arrays”.
Examples
from bokeh.plotting import figure, output_file, show p = figure(plot_width=300, plot_height=300) p.multi_line(xs=[[1, 2, 3], [2, 3, 4]], ys=[[6, 7, 2], [4, 5, 7]], color=['red','green']) show(p)
-
oval
(x, y, width, height, angle=0.0, **kwargs)¶ Configure and add oval glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-coordinates of the centers of the ovals. (default None)
- y (DataSpecPropertyDescriptor) – The y-coordinates of the centers of the ovals. (default None)
- width (UnitsSpecPropertyDescriptor) – The overall widths of each oval. (default None)
- height (UnitsSpecPropertyDescriptor) – The overall height of each oval. (default None)
- angle (UnitsSpecPropertyDescriptor) – The angle the ovals are rotated from horizontal. [rad] (default 0.0)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the ovals. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the ovals. (default ‘gray’)
- height_units (Enum('screen', 'data')) – (default ‘data’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the ovals. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the ovals. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the ovals. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the ovals. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the ovals. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the ovals. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the ovals. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
- width_units (Enum('screen', 'data')) – (default ‘data’)
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.oval(x=[1, 2, 3], y=[1, 2, 3], width=0.2, height=0.4, angle=-0.7, color="#1D91C0") show(plot)
-
patch
(x, y, **kwargs)¶ Configure and add patch glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-coordinates for the points of the patch. (default None)
- y (DataSpecPropertyDescriptor) – The y-coordinates for the points of the patch. (default None)
Keyword Arguments: - fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the patch. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the patch. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the patch. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the patch. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the patch. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the patch. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the patch. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the patch. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the patch. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show p = figure(plot_width=300, plot_height=300) p.patch(x=[1, 2, 3, 2], y=[6, 7, 2, 2], color="#99d8c9") show(p)
-
patches
(xs, ys, **kwargs)¶ Configure and add patches glyphs to this Figure.
Parameters: - xs (DataSpecPropertyDescriptor) – The x-coordinates for all the patches, given as a “list of lists”. (default None)
- ys (DataSpecPropertyDescriptor) – The y-coordinates for all the patches, given as a “list of lists”. (default None)
Keyword Arguments: - fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the patches. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the patches. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the patches. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the patches. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the patches. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the patches. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the patches. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the patches. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the patches. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Note
For this glyph, the data is not simply an array of scalars, it is an “array of arrays”.
Examples
from bokeh.plotting import figure, output_file, show p = figure(plot_width=300, plot_height=300) p.patches(xs=[[1,2,3],[4,5,6,5]], ys=[[1,2,1],[4,5,5,4]], color=["#43a2ca", "#a8ddb5"]) show(p)
-
quad
(left, right, top, bottom, **kwargs)¶ Configure and add quad glyphs to this Figure.
Parameters: - left (DataSpecPropertyDescriptor) – The x-coordinates of the left edges. (default None)
- right (DataSpecPropertyDescriptor) – The x-coordinates of the right edges. (default None)
- top (DataSpecPropertyDescriptor) – The y-coordinates of the top edges. (default None)
- bottom (DataSpecPropertyDescriptor) – The y-coordinates of the bottom edges. (default None)
Keyword Arguments: - fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the quads. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the quads. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the quads. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the quads. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the quads. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the quads. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the quads. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the quads. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the quads. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.quad(top=[2, 3, 4], bottom=[1, 2, 3], left=[1, 2, 3], right=[1.2, 2.5, 3.7], color="#B3DE69") show(plot)
-
quadratic
(x0, y0, x1, y1, cx, cy, **kwargs)¶ Configure and add quadratic glyphs to this Figure.
Parameters: - x0 (DataSpecPropertyDescriptor) – The x-coordinates of the starting points. (default None)
- y0 (DataSpecPropertyDescriptor) – The y-coordinates of the starting points. (default None)
- x1 (DataSpecPropertyDescriptor) – The x-coordinates of the ending points. (default None)
- y1 (DataSpecPropertyDescriptor) – The y-coordinates of the ending points. (default None)
- cx (DataSpecPropertyDescriptor) – The x-coordinates of the control points. (default None)
- cy (DataSpecPropertyDescriptor) – The y-coordinates of the control points. (default None)
Keyword Arguments: - js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the parabolas. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the parabolas. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the parabolas. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the parabolas. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the parabolas. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the parabolas. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the parabolas. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer
-
ray
(x, y, length, angle, **kwargs)¶ Configure and add ray glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-coordinates to start the rays. (default None)
- y (DataSpecPropertyDescriptor) – The y-coordinates to start the rays. (default None)
- length (UnitsSpecPropertyDescriptor) – The length to extend the ray. Note that this
length
defaults to screen units. (default None) - angle (UnitsSpecPropertyDescriptor) – The angles in radians to extend the rays, as measured from the horizontal. (default None)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- length_units (Enum('screen', 'data')) – (default ‘data’)
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the rays. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the rays. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the rays. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the rays. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the rays. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the rays. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the rays. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.ray(x=[1, 2, 3], y=[1, 2, 3], length=45, angle=-0.7, color="#FB8072", line_width=2) show(plot)
-
rect
(x, y, width, height, angle=0.0, dilate=False, **kwargs)¶ Configure and add rect glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-coordinates of the centers of the rectangles. (default None)
- y (DataSpecPropertyDescriptor) – The y-coordinates of the centers of the rectangles. (default None)
- width (UnitsSpecPropertyDescriptor) – The overall widths of the rectangles. (default None)
- height (UnitsSpecPropertyDescriptor) – The overall heights of the rectangles. (default None)
- angle (UnitsSpecPropertyDescriptor) – The angles to rotate the rectangles, as measured from the horizontal. (default 0.0)
- dilate (BasicPropertyDescriptor) – Whether to always round fractional pixel locations in such a way as to make the rectangles bigger. (default False)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the rectangles. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the rectangles. (default ‘gray’)
- height_units (Enum('screen', 'data')) – (default ‘data’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the rectangles. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the rectangles. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the rectangles. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the rectangles. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the rectangles. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the rectangles. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the rectangles. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
- width_units (Enum('screen', 'data')) – (default ‘data’)
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.rect(x=[1, 2, 3], y=[1, 2, 3], width=10, height=20, color="#CAB2D6", width_units="screen", height_units="screen") show(plot)
-
scatter
(*args, **kwargs)[source]¶ Creates a scatter plot of the given x and y items.
Parameters: - x (str or seq[float]) – values or field names of center x coordinates
- y (str or seq[float]) – values or field names of center y coordinates
- size (str or list[float]) – values or field names of sizes in screen units
- marker (str, optional) – a valid marker_type, defaults to “circle”
- color (color value, optional) – shorthand to set both fill and line color
- source (
ColumnDataSource
) – a user-supplied data source. An attempt will be made to convert the object toColumnDataSource
if needed. If none is supplied, one is created for the user automatically. - **kwargs – Line Properties and Fill Properties
Examples
>>> p.scatter([1,2,3],[4,5,6], fill_color="red") >>> p.scatter("data1", "data2", source=data_source, ...)
-
segment
(x0, y0, x1, y1, **kwargs)¶ Configure and add segment glyphs to this Figure.
Parameters: - x0 (DataSpecPropertyDescriptor) – The x-coordinates of the starting points. (default None)
- y0 (DataSpecPropertyDescriptor) – The y-coordinates of the starting points. (default None)
- x1 (DataSpecPropertyDescriptor) – The x-coordinates of the ending points. (default None)
- y1 (DataSpecPropertyDescriptor) – The y-coordinates of the ending points. (default None)
Keyword Arguments: - js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the segments. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the segments. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the segments. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the segments. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the segments. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the segments. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the segments. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.segment(x0=[1, 2, 3], y0=[1, 2, 3], x1=[1, 2, 3], y1=[1.2, 2.5, 3.7], color="#F4A582", line_width=3) show(plot)
-
square
(x, y, size=4, angle=0.0, **kwargs)¶ Configure and add square glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-axis coordinates for the center of the markers. (default None)
- y (DataSpecPropertyDescriptor) – The y-axis coordinates for the center of the markers. (default None)
- size (DataSpecPropertyDescriptor) – The size (diameter) values for the markers in screen space units. (default 4)
- angle (UnitsSpecPropertyDescriptor) – The angles to rotate the markers. (default 0.0)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the markers. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the markers. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the markers. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the markers. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the markers. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the markers. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the markers. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the markers. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the markers. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.square(x=[1, 2, 3], y=[1, 2, 3], size=[10,20,30], color="#74ADD1") show(plot)
-
square_cross
(x, y, size=4, angle=0.0, **kwargs)¶ Configure and add squarecross glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-axis coordinates for the center of the markers. (default None)
- y (DataSpecPropertyDescriptor) – The y-axis coordinates for the center of the markers. (default None)
- size (DataSpecPropertyDescriptor) – The size (diameter) values for the markers in screen space units. (default 4)
- angle (UnitsSpecPropertyDescriptor) – The angles to rotate the markers. (default 0.0)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the markers. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the markers. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the markers. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the markers. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the markers. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the markers. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the markers. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the markers. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the markers. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.square_cross(x=[1, 2, 3], y=[1, 2, 3], size=[10,20,25], color="#7FC97F",fill_color=None, line_width=2) show(plot)
-
square_x
(x, y, size=4, angle=0.0, **kwargs)¶ Configure and add squarex glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-axis coordinates for the center of the markers. (default None)
- y (DataSpecPropertyDescriptor) – The y-axis coordinates for the center of the markers. (default None)
- size (DataSpecPropertyDescriptor) – The size (diameter) values for the markers in screen space units. (default 4)
- angle (UnitsSpecPropertyDescriptor) – The angles to rotate the markers. (default 0.0)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the markers. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the markers. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the markers. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the markers. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the markers. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the markers. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the markers. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the markers. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the markers. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.square_x(x=[1, 2, 3], y=[1, 2, 3], size=[10,20,25], color="#FDAE6B",fill_color=None, line_width=2) show(plot)
-
text
(x, y, text='text', angle=0, x_offset=0, y_offset=0, **kwargs)¶ Configure and add text glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-coordinates to locate the text anchors. (default None)
- y (DataSpecPropertyDescriptor) – The y-coordinates to locate the text anchors. (default None)
- text (DataSpecPropertyDescriptor) – The text values to render. (default ‘text’)
- angle (UnitsSpecPropertyDescriptor) – The angles to rotate the text, as measured from the horizontal. (default 0)
- x_offset (DataSpecPropertyDescriptor) – Offset values to apply to the x-coordinates. (default 0)
- y_offset (DataSpecPropertyDescriptor) – Offset values to apply to the y-coordinates. (default 0)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
- text_align (BasicPropertyDescriptor) – The text align values for the text. (default ‘left’)
- text_alpha (DataSpecPropertyDescriptor) – The text alpha values for the text. (default 1.0)
- text_baseline (BasicPropertyDescriptor) – The text baseline values for the text. (default ‘bottom’)
- text_color (DataSpecPropertyDescriptor) – The text color values for the text. (default ‘#444444’)
- text_font (BasicPropertyDescriptor) – The text font values for the text. (default ‘helvetica’)
- text_font_size (DataSpecPropertyDescriptor) – The text font size values for the text. (default {‘value’: ‘12pt’})
- text_font_style (BasicPropertyDescriptor) – The text font style values for the text. (default ‘normal’)
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Note
The location and angle of the text relative to the
x
,y
coordinates is indicated by the alignment and baseline text properties.Returns: GlyphRenderer
-
triangle
(x, y, size=4, angle=0.0, **kwargs)¶ Configure and add triangle glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-axis coordinates for the center of the markers. (default None)
- y (DataSpecPropertyDescriptor) – The y-axis coordinates for the center of the markers. (default None)
- size (DataSpecPropertyDescriptor) – The size (diameter) values for the markers in screen space units. (default 4)
- angle (UnitsSpecPropertyDescriptor) – The angles to rotate the markers. (default 0.0)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the markers. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the markers. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the markers. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the markers. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the markers. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the markers. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the markers. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the markers. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the markers. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.triangle(x=[1, 2, 3], y=[1, 2, 3], size=[10,20,25], color="#99D594", line_width=2) show(plot)
-
vbar
(x, width, top, bottom=0, **kwargs)¶ Configure and add vbar glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-coordinates of the centers of the vertical bars. (default None)
- width (DataSpecPropertyDescriptor) – The widths of the vertical bars. (default None)
- top (DataSpecPropertyDescriptor) – The y-coordinates of the top edges. (default None)
- bottom (DataSpecPropertyDescriptor) – The y-coordinates of the bottom edges. (default 0)
Keyword Arguments: - fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the vertical bars. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the vertical bars. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the vertical bars. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the vertical bars. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the vertical bars. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the vertical bars. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the vertical bars. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the vertical bars. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the vertical bars. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.vbar(x=[1, 2, 3], width=0.5, bottom=0, top=[1,2,3], color="#CAB2D6") show(plot)
-
wedge
(x, y, radius, start_angle, end_angle, direction='anticlock', **kwargs)¶ Configure and add wedge glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-coordinates of the points of the wedges. (default None)
- y (DataSpecPropertyDescriptor) – The y-coordinates of the points of the wedges. (default None)
- radius (UnitsSpecPropertyDescriptor) – Radii of the wedges. (default None)
- start_angle (UnitsSpecPropertyDescriptor) – The angles to start the wedges, as measured from the horizontal. (default None)
- end_angle (UnitsSpecPropertyDescriptor) – The angles to end the wedges, as measured from the horizontal. (default None)
- direction (BasicPropertyDescriptor) – Which direction to stroke between the start and end angles. (default ‘anticlock’)
Keyword Arguments: - end_angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the wedges. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the wedges. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the wedges. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the wedges. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the wedges. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the wedges. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the wedges. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the wedges. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the wedges. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- radius_units (Enum('screen', 'data')) – (default ‘data’)
- start_angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.wedge(x=[1, 2, 3], y=[1, 2, 3], radius=15, start_angle=0.6, end_angle=4.1, radius_units="screen", color="#2b8cbe") show(plot)
-
x
(x, y, size=4, angle=0.0, **kwargs)¶ Configure and add x glyphs to this Figure.
Parameters: - x (DataSpecPropertyDescriptor) – The x-axis coordinates for the center of the markers. (default None)
- y (DataSpecPropertyDescriptor) – The y-axis coordinates for the center of the markers. (default None)
- size (DataSpecPropertyDescriptor) – The size (diameter) values for the markers in screen space units. (default 4)
- angle (UnitsSpecPropertyDescriptor) – The angles to rotate the markers. (default 0.0)
Keyword Arguments: - angle_units (Enum('deg', 'rad')) – (default ‘rad’)
- fill_alpha (DataSpecPropertyDescriptor) – The fill alpha values for the markers. (default 1.0)
- fill_color (DataSpecPropertyDescriptor) – The fill color values for the markers. (default ‘gray’)
- js_event_callbacks (BasicPropertyDescriptor) – A mapping of event names to lists of CustomJS callbacks. (default {})
- js_property_callbacks (BasicPropertyDescriptor) – A mapping of attribute names to lists of CustomJS callbacks, to be set up on BokehJS side when the document is created. (default {})
- line_alpha (DataSpecPropertyDescriptor) – The line alpha values for the markers. (default 1.0)
- line_cap (BasicPropertyDescriptor) – The line cap values for the markers. (default ‘butt’)
- line_color (DataSpecPropertyDescriptor) – The line color values for the markers. (default ‘black’)
- line_dash (BasicPropertyDescriptor) – The line dash values for the markers. (default [])
- line_dash_offset (BasicPropertyDescriptor) – The line dash offset values for the markers. (default 0)
- line_join (BasicPropertyDescriptor) – The line join values for the markers. (default ‘miter’)
- line_width (DataSpecPropertyDescriptor) – The line width values for the markers. (default 1)
- name (BasicPropertyDescriptor) – An arbitrary, user-supplied name for this model. (default None)
- subscribed_events (BasicPropertyDescriptor) – List of events that are subscribed to by Python callbacks. This is the set of events that will be communicated from BokehJS back to Python for this model. (default [])
- tags (BasicPropertyDescriptor) – An optional list of arbitrary, user-supplied values to attach to this model. (default [])
Other Parameters: - alpha (float) – an alias to set all alpha keyword args at once
- color (Color) – an alias to set all color keyword args at once
- source (ColumnDataSource) – a user supplied data source
- legend (str) – a legend tag for this glyph
- x_range_name (str) – name an extra range to use for mapping x-coordinates
- y_range_name (str) – name an extra range to use for mapping y-coordinates
- level (Enum) – control the render level order for this glyph
It is also possible to set the color and alpha parameters of a “nonselection” glyph. To do so, prefix any visual parameter with
'nonselection_'
. For example, passnonselection_alpha
ornonselection_fill_alpha
.Returns: GlyphRenderer Examples
from bokeh.plotting import figure, output_file, show plot = figure(plot_width=300, plot_height=300) plot.x(x=[1, 2, 3], y=[1, 2, 3], size=[10, 20, 25], color="#fa9fb5") show(plot)