Learn R Programming

rbokeh (version 0.4.2)

theme_legend: Override theme parameters for legend attributes

Description

Override theme parameters for legend attributes

Usage

theme_legend(fig, border_line_alpha = 1, border_line_cap = "butt", border_line_color = "black", border_line_dash = NULL, border_line_dash_offset = 0, border_line_join = "miter", border_line_width = 1, glyph_height = 20, glyph_width = 20, label_height = 20, label_standoff = 15, label_text_align = "left", label_text_alpha = 1, label_text_baseline = "bottom", label_text_color = "#444444", label_text_font = "Helvetica", label_text_font_size = "12pt", label_text_font_style = "normal", label_width = 50, legend_padding = 10, legend_spacing = 3, pars = NULL)

Arguments

fig
figure to modify
border_line_alpha
The line alpha for the legend border outline.
border_line_cap
('butt', 'round', 'square') The line cap for the legend border outline.
border_line_color
The line color for the legend border outline.
border_line_dash
The line dash for the legend border outline.
border_line_dash_offset
The line dash offset for the legend border outline.
border_line_join
('miter', 'round', 'bevel') The line join for the legend border outline.
border_line_width
The line width for the legend border outline.
glyph_height
The height (in pixels) that the rendered legend glyph should occupy.
glyph_width
The width (in pixels) that the rendered legend glyph should occupy.
label_height
The height (in pixels) of the area that legend labels should occupy.
label_standoff
The distance (in pixels) to separate the label from its associated glyph.
label_text_align
('left', 'right', 'center') The text align for the legend labels.
label_text_alpha
The text alpha for the legend labels.
label_text_baseline
('top', 'middle', 'bottom', 'alphabetic', 'hanging') The text baseline for the legend labels.
label_text_color
The text color for the legend labels.
label_text_font
The text font for the legend labels.
label_text_font_size
The text font size for the legend labels.
label_text_font_style
('normal', 'italic', 'bold') The text font style for the legend labels.
label_width
The width (in pixels) of the area that legend labels should occupy.
legend_padding
Amount of padding around the legend.
legend_spacing
Amount of spacing between legend entries.
pars
optionally specify a named list of all parameters - useful when dealing with theme lists

Examples

Run this code
figure(legend_location = "top_left") %>%
  ly_points(1:10, legend = "a") %>%
  theme_legend(border_line_width = 2)

Run the code above in your browser using DataLab