Skip to contents

Global parameters to add and customize plot borders of roboplots.

Usage

set_border(
  xcolor = getOption("roboplot.border")$xcolor,
  ycolor = getOption("roboplot.border")$ycolor,
  xmirror = getOption("roboplot.border")$xmirror,
  ymirror = getOption("roboplot.border")$ymirror,
  xwidth = getOption("roboplot.border")$xwidth,
  ywidth = getOption("roboplot.border")$ywidth
)

Arguments

xcolor, ycolor

Characters. Plot border colors. Must be hexadecimal colors or valid css color.

xmirror, ymirror

Logicals. Will the given axis be mirrored to left to right or bottom to top.

xwidth, ywidth

Numerics. Border width.

Value

A list of class roboplotr.set_border.

Examples

# You can global control x- and y-axis border mirroring, width and color by using
# `set_border()` inside `set_roboplot_options()`.

set_roboplot_options(
  border = set_border(ycolor = "green", xmirror = FALSE, xwidth = 5)
  )

energiantuonti |> dplyr::filter(Alue == "Venäjä") |> roboplot(Suunta)
# Reset to defaults set_roboplot_options(reset = TRUE)