bokeh.plotting Interface

figure(**kwargs)

Activate a new figure for plotting.

All subsequent plotting operations will affect the new figure.

This function accepts all plot style keyword parameters.

Returns:a new Plot
Return type:figure
class Figure(*arg, **kw)
annular_wedge(plot, *args, **kwargs)

The annular_wedge glyph renders annular wedges centered at x, y.

Parameters:
  • x (str or list[float]) – values or field names of center x coordinates
  • y (str or list[float]) – values or field names of center y coordinates
  • inner_radius (str or list[float]) – values or field names of inner radii
  • outer_radius (str or list[float]) – values or field names of outer radii
  • start_angle (str or list[float]) – values or field names of starting angles
  • end_angle (str or list[float]) – values or field names of ending angles
  • direction (“clock” or “anticlock”, optional) – direction to turn between starting and ending angles, defaults to “anticlock”

In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

Returns:plot
annulus(plot, *args, **kwargs)

The annulus glyph renders annuli centered at x, y.

Parameters:
  • x (str or list[float]) – values or field names of center x coordinates
  • y (str or list[float]) – values or field names of center y coordinates
  • inner_radius (str or list[float]) – values or field names of inner radii
  • outer_radius (str or list[float]) – values or field names of outer radii

In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

Returns:plot

Examples

from bokeh.plotting import figure, output_file, show

plot = figure(width=300, height=300)
plot.annulus(x=[1, 2, 3], y=[1, 2, 3], inner_radius=0.2,
            outer_radius=0.5, color="#7FC97F"
            )

show(plot)
          arc(plot, *args, **kwargs)

          The arc glyph renders circular arcs centered at x, y.

          Parameters:
          • x (str or list[float]) – values or field names of center x coordinates
          • y (str or list[float]) – values or field names of center y coordinates
          • radius (str or list[float]) – values or field names of arc radii
          • start_angle (str or list[float]) – values or field names of starting angles
          • end_angle (str or list[float]) – values or field names of ending angles
          • direction (“clock” or “anticlock”, optional) – direction to turn between starting and ending angles, defaults to “anticlock”

          In addition the the parameters specific to this glyph, Line Properties are also accepted as keyword parameters.

          Returns:plot
          asterisk(plot, *args, **kwargs)

          The asterisk glyph is a marker that renders asterisks at x, y with size size.

          Parameters:
          • x (str or list[float]) – values or field names of center x coordinates
          • y (str or list[float]) – values or field names of center y coordinates
          • size (str or list[float]) – values or field names of sizes in screen units

          In addition the the parameters specific to this glyph, Line Properties are also accepted as keyword parameters.

          Returns:plot

          Examples

          from bokeh.plotting import figure, output_file, show
          
          plot = figure(width=300, height=300)
          plot.asterisk(x=[1,2,3], y=[1,2,3], size=20, color="#F0027F")
          
          show(plot)
          
                  bezier(plot, *args, **kwargs)

                  The bezier glyph displays Bezier curves with the given starting, ending, and control points.

                  Parameters:
                  • x0 (str or list[float]) – values or field names of starting x coordinates
                  • y0 (str or list[float]) – values or field names of starting y coordinates
                  • x1 (str or list[float]) – values or field names of ending x coordinates
                  • y1 (str or list[float]) – values or field names of ending y coordinates
                  • cx0 (str or list[float]) – values or field names of first control point x coordinates
                  • cy0 (str or list[float]) – values or field names of first control point y coordinates
                  • cx1 (str or list[float]) – values or field names of second control point x coordinates
                  • cy1 (str or list[float]) – values or field names of second control point y coordinates

                  In addition the the parameters specific to this glyph, Line Properties are also accepted as keyword parameters.

                  Returns:plot
                  circle(plot, *args, **kwargs)

                  The circle glyph is a marker that renders circles at x, y with size size.

                  Parameters:
                  • x (str or list[float]) – values or field names of center x coordinates
                  • y (str or list[float]) – values or field names of center y coordinates
                  • size (str or list[float], optional) – values or field names of sizes in screen units
                  • radius (str or list[float], optional) – values or field names of radii

                  In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                  Returns:plot

                  Notes

                  Only one of size or radius should be provided. Note that radius defaults to data units.

                  Examples

                  from bokeh.plotting import figure, output_file, show
                  
                  plot = figure(width=300, height=300)
                  plot.circle(x=[1, 2, 3], y=[1, 2, 3], radius=0.1, size=20)
                  
                  show(plot)
                  
                          circle_cross(plot, *args, **kwargs)

                          The circle_cross glyph is a marker that renders circles together with a crossbar (+) at x, y with size size or radius.

                          Parameters:
                          • x (str or list[float]) – values or field names of center x coordinates
                          • y (str or list[float]) – values or field names of center y coordinates
                          • size (str or list[float]) – values or field names of sizes in screen units

                          In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                          Returns:plot

                          Examples

                          from bokeh.plotting import figure, output_file, show
                          
                          plot = figure(width=300, height=300)
                          plot.circle_cross(x=[1,2,3], y=[4,5,6], fill_alpha=0, line_width=2,
                                           color="#FB8072", size=20)
                          
                          show(plot)
                          
                                  circle_x(plot, *args, **kwargs)

                                  The circle_x glyph is a marker that renders circles together with a “X” glyph at x, y with size size.

                                  Parameters:
                                  • x (str or list[float]) – values or field names of center x coordinates
                                  • y (str or list[float]) – values or field names of center y coordinates
                                  • size (str or list[float]) – values or field names of sizes in screen units

                                  In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                                  Returns:plot

                                  Examples

                                  from bokeh.plotting import figure, output_file, show
                                  
                                  plot = figure(width=300, height=300)
                                  plot.circle_x(x=[1, 2, 3], y=[1, 2, 3], radius=0.1, size=20,
                                               fill_alpha=0, color="#DD1C77")
                                  
                                  show(plot)
                                  

                                  Error

                                  Unable to generate Bokeh plot at /media/data/devel/continuum/bokeh_project/bokeh/sphinx/source/docs/reference/plotting.rst:250:

                                  unexpected attribute ‘radius’ to CircleX, possible attributes are angle, fill_alpha, fill_color, line_alpha, line_cap, line_color, line_dash, line_dash_offset, line_join, line_width, name, session, size, tags, visible, x or y

                                  cross(plot, *args, **kwargs)

                                  The cross glyph is a marker that renders crossbars (+) at x, y with size size.

                                  Parameters:
                                  • x (str or list[float]) – values or field names of center x coordinates
                                  • y (str or list[float]) – values or field names of center y coordinates
                                  • size (str or list[float]) – values or field names of sizes in screen units

                                  In addition the the parameters specific to this glyph, Line Properties are also accepted as keyword parameters.

                                  Returns:plot

                                  Examples

                                  from bokeh.plotting import figure, output_file, show
                                  
                                  plot = figure(width=300, height=300)
                                  plot.cross(x=[1, 2, 3], y=[1, 2, 3], size=20,
                                              color="#E6550D", line_width=2)
                                  
                                  show(plot)
                                  
                                          diamond(plot, *args, **kwargs)

                                          The diamond glyph is a marker that renders diamonds at x, y with size size or radius.

                                          Parameters:
                                          • x (str or list[float]) – values or field names of center x coordinates
                                          • y (str or list[float]) – values or field names of center y coordinates
                                          • size (str or list[float]) – values or field names of sizes in screen units

                                          In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                                          Returns:plot

                                          Examples

                                          from bokeh.plotting import figure, output_file, show
                                          
                                          plot = figure(width=300, height=300)
                                          plot.diamond(x=[1, 2, 3], y=[1, 2, 3], size=20,
                                                      color="#1C9099", line_width=2)
                                          
                                          show(plot)
                                          
                                                  diamond_cross(plot, *args, **kwargs)

                                                  The diamond_cross glyph is a marker that renders diamonds together with a crossbar (+) at x, y with size size or radius.

                                                  Parameters:
                                                  • x (str or list[float]) – values or field names of center x coordinates
                                                  • y (str or list[float]) – values or field names of center y coordinates
                                                  • size (str or list[float]) – values or field names of sizes in screen units

                                                  In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                                                  Returns:plot

                                                  Examples

                                                  from bokeh.plotting import figure, output_file, show
                                                  
                                                  plot = figure(width=300, 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)
                                                  
                                                          get_class(view_model_name)

                                                          Given a __view_model__ name, returns the corresponding class object

                                                          image(plot, *args, **kwargs)

                                                          The image glyph takes each image as a two-dimensional array of scalar data.

                                                          A palette (string name of a built-in palette, currently) must also be supplied to use for color-mapping the scalar image.

                                                          Parameters:
                                                          • image (str or 2D array_like of float) – value or field names of scalar image data
                                                          • x (str or list[float]) – values or field names of lower left x coordinates
                                                          • y (str or list[float]) – values or field names of lower left y coordinates
                                                          • dw (str or list[float]) – values or field names of image width distances
                                                          • dh (str or list[float]) – values or field names of image height distances
                                                          • palette (str or list[str]) – values or field names of palettes to use for color-mapping (see Standard Palettes for more details)
                                                          • color_mapper (LinearColorMapper) – a LinearColorMapper instance
                                                          • dilate (bool, optional) – whether to dilate pixel distance computations when drawing, defaults to False
                                                          Returns:

                                                          plot

                                                          Notes

                                                          setting dilate to True will cause pixel distances (e.g., for dw and dh) to be rounded up, always.

                                                          image_rgba(plot, *args, **kwargs)

                                                          The image_rgba glyph takes each image as a two-dimensional array of RGBA values (encoded as 32-bit integers).

                                                          Parameters:
                                                          • image (str or 2D array_like of uint32) – value or field names of RGBA image data
                                                          • x (str or list[float]) – values or field names of lower left x coordinates
                                                          • y (str or list[float]) – values or field names of lower left y coordinates
                                                          • dw (str or list[float]) – values or field names of image width distances
                                                          • dh (str or list[float]) – values or field names of image height distances
                                                          • dilate (bool, optional) – whether to dilate pixel distance computations when drawing, defaults to False
                                                          Returns:

                                                          plot

                                                          Notes

                                                          setting dilate to True will cause pixel distances (e.g., for dw and dh) to be rounded up, always.

                                                          image_url(plot, *args, **kwargs)

                                                          The image_url glyph takes a urls for images to display.

                                                          Parameters:
                                                          • url (str) – value of RGBA image data
                                                          • x (str or list[float]) – values or field names of upper left x coordinates
                                                          • y (str or list[float]) – values or field names of upper left y coordinates
                                                          • angle (float) – angle to rotate image by
                                                          Returns:

                                                          plot

                                                          inverted_triangle(plot, *args, **kwargs)

                                                          The inverted_triangle glyph is a marker that renders upside-down triangles at x, y with size size or radius.

                                                          Parameters:
                                                          • x (str or list[float]) – values or field names of center x coordinates
                                                          • y (str or list[float]) – values or field names of center y coordinates
                                                          • size (str or list[float]) – values or field names of sizes in screen units

                                                          In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                                                          Returns:plot

                                                          Examples

                                                          from bokeh.plotting import figure, output_file, show
                                                          
                                                          plot = figure(width=300, height=300)
                                                          plot.inverted_triangle(x=[1, 2, 3], y=[1, 2, 3], size=20,
                                                                                color="#DE2D26")
                                                          
                                                          show(plot)
                                                          
                                                                  line(plot, *args, **kwargs)

                                                                  The line glyph displays a single line that connects several points given by the arrays of coordinates x and y.

                                                                  In addition the the parameters specific to this glyph, Line Properties are also accepted as keyword parameters.

                                                                  Parameters:
                                                                  • x (str or list[float]) – values or field names of line x coordinates
                                                                  • y (str or list[float]) – values or field names of line y coordinates

                                                                  In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                                                                  Returns:plot

                                                                  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(plot, *args, **kwargs)

                                                                          The multi_line glyph displays lines, each with points given by the arrays of coordinates that are the elements of xs and ys.

                                                                          Parameters:
                                                                          • xs (str or list[list[float]]) – values or field names of lines x coordinates
                                                                          • ys (str or list[list[float]]) – values or field names of lines y coordinates

                                                                          In addition the the parameters specific to this glyph, Line Properties are also accepted as keyword parameters.

                                                                          Note

                                                                          For this glyph, the data is not simply an array of scalars, it is really an “array of arrays”.

                                                                          Returns:plot

                                                                          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(plot, *args, **kwargs)

                                                                                  The oval glyph displays ovals centered on the given coordinates with the given dimensions and angle.

                                                                                  Parameters:
                                                                                  • x (str or list[float]) – values or field names of center x coordinates
                                                                                  • y (str or list[float]) – values or field names of center y coordinates
                                                                                  • width (str or list[float]) – values or field names of widths
                                                                                  • height (str or list[float]) – values or field names of heights
                                                                                  • angle (str or list[float], optional) – values or field names of rotation angles, defaults to 0

                                                                                  In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                                                                                  Returns:plot

                                                                                  Examples

                                                                                  from bokeh.plotting import figure, output_file, show
                                                                                  
                                                                                  plot = figure(width=300, height=300)
                                                                                  plot.oval(x=[1, 2, 3], y=[1, 2, 3], width=15, height=25, angle=-0.7, color="#1D91C0",
                                                                                           width_units="screen", height_units="screen")
                                                                                  
                                                                                  show(plot)
                                                                                  
                                                                                          patch(plot, *args, **kwargs)

                                                                                          The patch glyph displays a single polygonal patch that connects several points given by the arrays of coordinates x and y.

                                                                                          Parameters:
                                                                                          • x (str or list[float]) – values or field names of patch x coordinates
                                                                                          • y (str or list[float]) – values or field names of patch y coordinates

                                                                                          In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                                                                                          Returns:plot

                                                                                          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(plot, *args, **kwargs)

                                                                                                  The patches glyph displays several patches, each with points given by the arrays of coordinates that are the elements of xs and ys.

                                                                                                  Parameters:
                                                                                                  • xs (str or list[list[float]]) – values or field names of patches x coordinates
                                                                                                  • ys (str or list[list[float]]) – values or field names of patches y coordinates

                                                                                                  In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                                                                                                  Note

                                                                                                  For this glyph, the data is not simply an array of scalars, it is really an “array of arrays”.

                                                                                                  Returns:plot

                                                                                                  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(plot, *args, **kwargs)

                                                                                                          The quad glyph displays axis-aligned rectangles with the given dimensions.

                                                                                                          Parameters:
                                                                                                          • left (str or list[float]) – values or field names of left edges
                                                                                                          • right (str or list[float]) – values or field names of right edges
                                                                                                          • top (str or list[float]) – values or field names of top edges
                                                                                                          • bottom (str or list[float]) – values or field names of bottom edges

                                                                                                          In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                                                                                                          Returns:plot

                                                                                                          Examples

                                                                                                          from bokeh.plotting import figure, output_file, show
                                                                                                          
                                                                                                          plot = figure(width=300, 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(plot, *args, **kwargs)

                                                                                                                  The quadratic glyph displays quadratic curves with the given starting, ending, and control points.

                                                                                                                  Parameters:
                                                                                                                  • x0 (str or list[float]) – values or field names of starting x coordinates
                                                                                                                  • y0 (str or list[float]) – values or field names of starting y coordinates
                                                                                                                  • x1 (str or list[float]) – values or field names of ending x coordinates
                                                                                                                  • y1 (str or list[float]) – values or field names of ending y coordinates
                                                                                                                  • cx (str or list[float]) – values or field names of control point x coordinates
                                                                                                                  • cy (str or list[float]) – values or field names of control point y coordinates

                                                                                                                  In addition the the parameters specific to this glyph, Line Properties are also accepted as keyword parameters.

                                                                                                                  Returns:plot
                                                                                                                  ray(plot, *args, **kwargs)

                                                                                                                  The ray glyph displays line segments starting at the given coordinate and extending the given length at the given angle.

                                                                                                                  Parameters:
                                                                                                                  • x (str or list[float]) – values or field names of center x coordinates
                                                                                                                  • y (str or list[float]) – values or field names of center y coordinates
                                                                                                                  • length (str or list[float]) – values or field names of ray lengths in screen units
                                                                                                                  • angle (str or list[float]) – values or field names of ray angles

                                                                                                                  In addition the the parameters specific to this glyph, Line Properties are also accepted as keyword parameters.

                                                                                                                  Returns:plot

                                                                                                                  Examples

                                                                                                                  from bokeh.plotting import figure, output_file, show
                                                                                                                  
                                                                                                                  plot = figure(width=300, 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(plot, *args, **kwargs)

                                                                                                                          The rect glyph displays rectangles centered on the given coordinates with the given dimensions and angle.

                                                                                                                          Parameters:
                                                                                                                          • x (str or list[float]) – values or field names of center x coordinates
                                                                                                                          • y (str or list[float]) – values or field names of center y coordinates
                                                                                                                          • width (str or list[float]) – values or field names of widths
                                                                                                                          • height (str or list[float]) – values or field names of heights
                                                                                                                          • angle (str or list[float], optional) – values or field names of rotation angles, defaults to 0
                                                                                                                          • dilate (bool, optional) – whether to dilate pixel distance computations when drawing, defaults to False

                                                                                                                          In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                                                                                                                          Returns:plot

                                                                                                                          Notes

                                                                                                                          setting dilate to True will cause pixel distances (e.g., for width and height) to be rounded up, always.

                                                                                                                          Examples

                                                                                                                          from bokeh.plotting import figure, output_file, show
                                                                                                                          
                                                                                                                          plot = figure(width=300, 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)

                                                                                                                                  Creates a scatter plot of the given x and y items.

                                                                                                                                  Parameters:
                                                                                                                                  • *args

                                                                                                                                    The data to plot. Can be of several forms:

                                                                                                                                    (X, Y)
                                                                                                                                    Two 1D arrays or iterables
                                                                                                                                    (XNAME, YNAME)
                                                                                                                                    Two bokeh DataSource/ColumnsRef
                                                                                                                                  • marker (str, optional) – a valid marker_type, defaults to “circle”
                                                                                                                                  • color (color value, optional) – shorthand to set both fill and line color

                                                                                                                                  All the Line Properties and Fill Properties are also accepted as keyword parameters.

                                                                                                                                  Examples

                                                                                                                                  >>> p.scatter([1,2,3],[4,5,6], fill_color="red")
                                                                                                                                  >>> p.scatter("data1", "data2", source=data_source, ...)
                                                                                                                                  
                                                                                                                                  segment(plot, *args, **kwargs)

                                                                                                                                  The segment glyph displays line segments with the given starting and ending coordinates.

                                                                                                                                  Parameters:
                                                                                                                                  • x0 (str or list[float]) – values or field names of starting x coordinates
                                                                                                                                  • y0 (str or list[float]) – values or field names of starting y coordinates
                                                                                                                                  • x1 (str or list[float]) – values or field names of ending x coordinates
                                                                                                                                  • y1 (str or list[float]) – values or field names of ending y coordinates

                                                                                                                                  In addition the the parameters specific to this glyph, Line Properties are also accepted as keyword parameters.

                                                                                                                                  Returns:plot

                                                                                                                                  Examples

                                                                                                                                  from bokeh.plotting import figure, output_file, show
                                                                                                                                  
                                                                                                                                  plot = figure(width=300, 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(plot, *args, **kwargs)

                                                                                                                                          The square glyph is a marker that renders squares at x, y with size size.

                                                                                                                                          In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                                                                                                                                          Parameters:
                                                                                                                                          • x (str or list[float]) – values or field names of center x coordinates
                                                                                                                                          • y (str or list[float]) – values or field names of center y coordinates
                                                                                                                                          • size (str or list[float]) – values or field names of sizes in screen units
                                                                                                                                          Returns:

                                                                                                                                          plot

                                                                                                                                          Examples

                                                                                                                                          from bokeh.plotting import figure, output_file, show
                                                                                                                                          
                                                                                                                                          plot = figure(width=300, height=300)
                                                                                                                                          plot.square(x=[1, 2, 3], y=[1, 2, 3], size=[10,20,30], color="#74ADD1")
                                                                                                                                          
                                                                                                                                          show(plot)
                                                                                                                                          
                                                                                                                                                  square_cross(plot, *args, **kwargs)

                                                                                                                                                  The square_cross glyph is a marker that renders squares together with a crossbar (+) at x, y with size size.

                                                                                                                                                  Parameters:
                                                                                                                                                  • x (str or list[float]) – values or field names of center x coordinates
                                                                                                                                                  • y (str or list[float]) – values or field names of center y coordinates
                                                                                                                                                  • size (str or list[float]) – values or field names of sizes in screen units

                                                                                                                                                  In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                                                                                                                                                  Returns:plot

                                                                                                                                                  Examples

                                                                                                                                                  from bokeh.plotting import figure, output_file, show
                                                                                                                                                  
                                                                                                                                                  plot = figure(width=300, 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(plot, *args, **kwargs)

                                                                                                                                                          The square_x glyph is a marker that renders squares together with “X” glyphs at x, y with size size.

                                                                                                                                                          In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                                                                                                                                                          Parameters:
                                                                                                                                                          • x (str or list[float]) – values or field names of center x coordinates
                                                                                                                                                          • y (str or list[float]) – values or field names of center y coordinates
                                                                                                                                                          • size (str or list[float]) – values or field names of sizes in screen units
                                                                                                                                                          Returns:

                                                                                                                                                          plot

                                                                                                                                                          Examples

                                                                                                                                                          from bokeh.plotting import figure, output_file, show
                                                                                                                                                          
                                                                                                                                                          plot = figure(width=300, 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(plot, *args, **kwargs)

                                                                                                                                                                  The text glyph displays text at the given coordinates rotated by the given angle.

                                                                                                                                                                  Parameters:
                                                                                                                                                                  • x (str or list[float]) – values or field names of text x coordinates
                                                                                                                                                                  • y (str or list[float]) – values or field names of text y coordinates
                                                                                                                                                                  • text (str or list[text]) – values or field names of texts
                                                                                                                                                                  • angle (str or list[float], optional) – values or field names of text angles, defaults to 0

                                                                                                                                                                  In addition the the parameters specific to this glyph, Text Properties are also accepted as keyword parameters.

                                                                                                                                                                  Note

                                                                                                                                                                  The location and angle of the text relative to the x, y coordinates is indicated by the alignment and baseline text properties.

                                                                                                                                                                  Returns:plot
                                                                                                                                                                  triangle(plot, *args, **kwargs)

                                                                                                                                                                  The triangle glyph is a marker that renders triangles at x, y with size size.

                                                                                                                                                                  In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                                                                                                                                                                  Parameters:
                                                                                                                                                                  • x (str or list[float]) – values or field names of center x coordinates
                                                                                                                                                                  • y (str or list[float]) – values or field names of center y coordinates
                                                                                                                                                                  • size (str or list[float]) – values or field names of sizes in screen units
                                                                                                                                                                  Returns:

                                                                                                                                                                  plot

                                                                                                                                                                  Examples

                                                                                                                                                                  from bokeh.plotting import figure, output_file, show
                                                                                                                                                                  
                                                                                                                                                                  plot = figure(width=300, height=300)
                                                                                                                                                                  plot.triangle(x=[1, 2, 3], y=[1, 2, 3], size=[10,20,25],
                                                                                                                                                                               color="#99D594", line_width=2)
                                                                                                                                                                  
                                                                                                                                                                  show(plot)
                                                                                                                                                                  
                                                                                                                                                                          wedge(plot, *args, **kwargs)

                                                                                                                                                                          The wedge glyph renders circular wedges centered at x, y.

                                                                                                                                                                          Parameters:
                                                                                                                                                                          • x (str or list[float]) – values or field names of center x coordinates
                                                                                                                                                                          • y (str or list[float]) – values or field names of center y coordinates
                                                                                                                                                                          • radius (str or list[float]) – values or field names of wedge radii
                                                                                                                                                                          • start_angle (str or list[float]) – values or field names of starting angles
                                                                                                                                                                          • end_angle (str or list[float]) – values or field names of ending angles
                                                                                                                                                                          • direction (“clock” or “anticlock”, optional) – direction to turn between starting and ending angles, defaults to “anticlock”

                                                                                                                                                                          In addition the the parameters specific to this glyph, Line Properties and Fill Properties are also accepted as keyword parameters.

                                                                                                                                                                          Returns:plot

                                                                                                                                                                          Examples

                                                                                                                                                                          from bokeh.plotting import figure, output_file, show
                                                                                                                                                                          
                                                                                                                                                                          plot = figure(width=300, 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(plot, *args, **kwargs)

                                                                                                                                                                                  The x glyph is a marker that renders “x” glyphs at x, y with size size.

                                                                                                                                                                                  In addition the the parameters specific to this glyph, Line Properties are also accepted as keyword parameters.

                                                                                                                                                                                  Parameters:
                                                                                                                                                                                  • x (str or list[float]) – values or field names of center x coordinates
                                                                                                                                                                                  • y (str or list[float]) – values or field names of center y coordinates
                                                                                                                                                                                  • size (str or list[float]) – values or field names of sizes in screen units
                                                                                                                                                                                  Returns:

                                                                                                                                                                                  plot

                                                                                                                                                                                  Examples

                                                                                                                                                                                  from bokeh.plotting import figure, output_file, show
                                                                                                                                                                                  
                                                                                                                                                                                  plot = figure(width=300, height=300)
                                                                                                                                                                                  plot.x(x=[1, 2, 3], y=[1, 2, 3], size=[10, 20, 25], color="#fa9fb5")
                                                                                                                                                                                  
                                                                                                                                                                                  show(plot)
                                                                                                                                                                                  
                                                                                                                                                                                          axis

                                                                                                                                                                                          Get all the current axis objects

                                                                                                                                                                                          Returns:splattable list of axis objects on this Plot
                                                                                                                                                                                          grid

                                                                                                                                                                                          Get the current grid object(s)

                                                                                                                                                                                          Returns:splattable list of grid objects on this Plot
                                                                                                                                                                                          legend

                                                                                                                                                                                          Get the current legend object(s)

                                                                                                                                                                                          Returns:splattable list of legend objects on this Plot
                                                                                                                                                                                          xaxis

                                                                                                                                                                                          Get the current x axis object(s)

                                                                                                                                                                                          Returns:splattable list of x-axis objects on this Plot
                                                                                                                                                                                          xgrid

                                                                                                                                                                                          Get the current x grid object(s)

                                                                                                                                                                                          Returns:splattable list of legend objects on this Plot
                                                                                                                                                                                          yaxis

                                                                                                                                                                                          Get the current y axis object(s)

                                                                                                                                                                                          Returns:splattable list of y-axis objects on this Plot
                                                                                                                                                                                          ygrid

                                                                                                                                                                                          Get the current y grid object(s)

                                                                                                                                                                                          Returns:splattable list of y-grid objects on this Plot