Skip to contents

various functions for controlling guide elements such as title, axis label, legend, and fonts

Usage

x_options(
  w,
  title = NULL,
  xlabel = NULL,
  ylabel = NULL,
  palette = NULL,
  font_family = "xkcd",
  stroke = "black",
  background = "white",
  legend = TRUE,
  legend_position = 1,
  time_format = NULL,
  x_breaks = 3,
  y_breaks = 3,
  ...
)

x_label(w, title = NULL, xlabel = NULL, ylabel = NULL)

x_title(w, title = NULL)

x_legend(w, legend = TRUE, legend_position = 1)

Arguments

w

an xkcd widget object

title

title

xlabel

title for x axis

ylabel

title for y axis

palette

color palette for different groups

font_family

font family

stroke

color for axis, title and legend box

background

background color

legend

if legend should be shown

legend_position

a integer controlling legend position, 1 (up left), 2 (up right), 3 (down left), 4 (down right)

time_format

time format to use if the x values are time, chart.xkcd use dayjs to format time, find the all the available formats at https://github.com/iamkun/dayjs/blob/dev/docs/en/API-reference.md#list-of-all-available-formats

x_breaks

number of breaks for x axis

y_breaks

number of breaks for y axis