Override theme parameters for legend attributes
theme_legend(
fig,
background_fill_alpha = 0.95,
background_fill_color = "#fff",
border_line_alpha = 0.5,
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
)
figure to modify
(numeric) background color alpha of plot
(color) background color of plot
The line alpha for the legend border outline.
('butt', 'round', 'square') The line cap for the legend border outline.
The line color for the legend border outline.
The line dash for the legend border outline.
The line dash offset for the legend border outline.
('miter', 'round', 'bevel') The line join for the legend border outline.
The line width for the legend border outline.
The height (in pixels) that the rendered legend glyph should occupy.
The width (in pixels) that the rendered legend glyph should occupy.
The height (in pixels) of the area that legend labels should occupy.
The distance (in pixels) to separate the label from its associated glyph.
('left', 'right', 'center') The text align for the legend labels.
The text alpha for the legend labels.
('top', 'middle', 'bottom', 'alphabetic', 'hanging') The text baseline for the legend labels.
The text color for the legend labels.
The text font for the legend labels.
The text font size for the legend labels.
('normal', 'italic', 'bold') The text font style for the legend labels.
The width (in pixels) of the area that legend labels should occupy.
Amount of padding around the legend.
Amount of spacing between legend entries.
optionally specify a named list of all parameters - useful when dealing with theme lists
# NOT RUN {
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