Skip to contents

Parameters to customize grids in roboplots.

Usage

set_grid(
  xcolor = getOption("roboplot.grid")$xcolor,
  ycolor = getOption("roboplot.grid")$ycolor,
  xwidth = getOption("roboplot.grid")$xwidth,
  ywidth = getOption("roboplot.grid")$ywidth,
  xdash = getOption("roboplot.grid")$xdash,
  ydash = getOption("roboplot.grid")$ydash,
  xtick = NULL,
  ytick = NULL
)

Arguments

xcolor, ycolor, xtick, ytick

Characters. Plot gridline colors. Must be hexadecimal colors or a valid css colors.

xwidth, ywidth

Numerics. Plot gridline widths.

xdash, ydash

Characters. Plot gridline linetypes. Must contain one of "solid", "dash", "dot", "longdash", "dashdot", and "longdashdot" in any order.

Value

A list of class roboplot.set_grid

Examples

# You can control x- and y-grid color, width and linetype by using
# `set_grid()` inside `set_roboplot_options()`.

set_roboplot_options(
  grid = set_grid(ycolor = "green", ydash = "longdash", xwidth = 3),
  )

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