Plotting

Basics

Bokeh.figureFunction
figure(; ...)

Create a new Figure and return it.

Acceptable keyword arguments are:

  • Anything taken by Figure.
  • x_range/y_range: Sets the x/y-range. May be a vector of factors or a 2-tuple representing an interval. Default: DataRange1d().
  • x_axis/y_axis: Sets the x/y-axis. May be nothing to suppress. Default: LinearAxis().
  • x_axis_location/y_axis_location: Where to put the axis. One of "left", "right", "above" or "below". Default: "below"/"left".
  • x_axis_label/y_axis_label: Sets the label on the x/y-axis.
  • x_grid/y_grid: Sets the x/y-grid. May be nothing to suppress.
  • tools: Optional list of tools to create a toolbar from.
  • tooltips: If given, add a HoverTool with these tooltips.
source
Bokeh.plot!Function
plot!(plot, item; ...)
plot!(plot, type; ...)

Adds a new item to the plot, or an item of the given type.

When passing a type, the allowed keyword arguments include anything accepted by the type. Some additional arguments are allowed depending on what item or type is.

The constructed item is returned. In the case of glyphs, the corresponding GlyphRenderer is returned instead.

Glyphs

Additional keyword arguments:

  • Anything accepted by GlyphRenderer.
  • source: Alias for data_source. May be a DataSource, Dict of columns, or a Tables.jl-style table.
  • color: Alias for all the *_color properties.
  • alpha: Alias for all the *_alpha properties.
  • palette: If the glyph has a color_mapper property, it is set to a LinearColorMapper with this palette.
  • legend_label
  • legend_field
  • legend_group
  • filters: List of filters to apply to the source data.

Renderers

This includes axes, grids, legends and other annotations.

Additional keyword arguments:

  • location: One of "center" (default), "left", "right", "below" or "above".
  • dimension: For axes, you must specify either the location or dimension and the other one is inferred.

Tools

Additional keyword arguments:

  • activate: If true, then set the tool as the active one of its kind on the toolbar.
source

Layouts

Bokeh.rowFunction
row(items; ...)
row(items...; ...)

Create a new Row with the given items.

source
Bokeh.gridFunction
grid(items; ...)
grid(items...; ...)

Create a GridBox from the given items.

The items argument is one of:

  • A vector of other items. The top-level vector arranges its items in a column. Subsequent nesting of vectors switch between rows and columns, making it easy to create complex layouts.
  • A matrix, specifying two levels of nesting.
  • A LayoutDOM object, which is the terminal entry in the grid.
  • A Row or Column, explicitly specifying a row or column of the grid.
  • nothing, representing a blank cell.

Keyword arguments

  • sizing_mode: How the resulting grid is sized.
  • nrows or ncols: If items is a vector and one of these arguments is specified, it is partitioned into a 2D layout with the given number of rows or columns.
  • item_width, item_height: The width and height of each item.
  • merge_tools=true: When true, toolbars of constituent plots are merged into one.
  • toolbar_location="above": Where to place the merged toolbar. May be nothing.
  • toolbar_options: A named tuple of options for the merged toolbar.
  • Remaining arguments are passed to GridBox.
source

Transforms

These can be used as the value for properties such as fill_color or mark.

Bokeh.jitterFunction
jitter(field, width; ...)

Transform the given field with a Jitter that applies random pertubations of the given width.

source