ann_title {rbokeh}R Documentation

Add or update the "title" annotation to a Bokeh figure

Description

Add or update the "title" annotation to a Bokeh figure

Usage

ann_title(fig, text = NULL, align = NULL, text_color = NULL,
  text_alpha = NULL, text_font_size = NULL, text_font = NULL,
  text_font_style = NULL, offset = NULL, background_fill_color = NULL,
  background_fill_alpha = NULL, border_line_color = NULL,
  border_line_alpha = NULL, border_line_width = NULL,
  border_line_join = NULL, border_line_cap = NULL,
  border_line_dash = NULL, border_line_dash_offset = NULL,
  render_mode = NULL)

Arguments

fig

Figure to modify.

text

The text value to render.

align

Location to align the title text.

text_color

Color to use to render text with - a hex code (with no alpha) or any of the 147 named CSS colors, e.g 'green', 'indigo'.

text_alpha

An alpha value to use to fill text with. Acceptable values are floating point numbers between 0 (transparent) and 1 (opaque).

text_font_size

Font size in px, em, or pt, e.g., '12pt', '1.5em'.

text_font

Name of a font to use for rendering text, e.g., 'times', 'helvetica'.

text_font_style

A style to use for rendering text. One of 'normal' 'italic' 'bold'.

offset

Offset the text by a number of pixels (can be positive or negative). Shifts the text in different directions based on the location of the title. Possible values are "above", "below", "right", "left".

background_fill_color

The fill color values for the text bounding box.

background_fill_alpha

The fill alpha values for the text bounding box.

border_line_color

The line color values for the text bounding box.

border_line_alpha

The line alpha values for the text bounding box.

border_line_width

The line width values for the text bounding box.

border_line_join

The line join values for the text bounding box.

border_line_cap

The line cap values for the text bounding box.

border_line_dash

The line dash values for the text bounding box.

border_line_dash_offset

The line dash offset values for the text bounding box.

render_mode

Specifies whether the text is rendered as a canvas element or as an css element overlaid on the canvas. The default mode is "canvas". Note: The CSS labels won't be present in the output using the "save" tool. Warning: Not all visual styling properties are supported if the render_mode is set to "css". The border_line_dash property isn't fully supported and border_line_dash_offset isn't supported at all. Setting text_alpha will modify the opacity of the entire background box and border in addition to the text. Finally, clipping Label annotations inside of the plot area isn't supported in "css" mode.

See Also

Other annotation functions: ann_arrow, ann_band, ann_box, ann_labels, ann_poly, ann_span, ann_whisker, arrow

Examples

# note title can also be specified in figure() but more control with ann_title()
figure() %>%
  ly_points(1:10, 1:10) %>%
  ann_title("title example")

# more control over title annotation
figure(title = "title example") %>%
  ly_points(1:10, 1:10) %>%
  ann_title(text_font = "Courier", text_font_size = 20)

[Package rbokeh version 0.6.3 Index]