Learn R Programming

esvis (version 0.2.0)

empty_plot: Create an empty plot

Description

This function creates an empty plot for further plotting (e.g., via lines). What makes the function unique is that it allows for specification of default xlab, ylab, and main arguments, while allowing the user to override those arguments. Only really useful when used within other functions (e.g., pp_plot).

Usage

empty_plot(x, y, default_xlab = NULL, default_ylab = NULL,
  default_main = NULL, default_xlim = NULL, default_ylim = NULL,
  default_xaxt = NULL, default_yaxt = NULL, default_bty = "n",
  theme = "standard", las = c(1, 2), ...)

Arguments

x

The x variable to be plotted.

y

The y variable to be plotted.

default_xlab

The default x-label, which can be overridden by the user. Defaults to NULL, in which case the label is defined by the default plot function.

default_ylab

The default y-label, which can be overridden by the user. Defaults to NULL, in which case the label is defined by the default plot function.

default_main

The default main title, which can be overridden by the user. Defaults to NULL, in which case the title is defined by the default plot function.

default_xlim

The default x-axis limits, which can be overridden by the user. Defaults to NULL, in which case the limits are defined by the default plot function.

default_ylim

The default y-axis limits, which can be overridden by the user. Defaults to NULL, in which case the limits are defined by the default plot function.

default_xaxt

The default x-axis type, which can be overridden by the user. Defaults to NULL, in which case the type is defined by the default plot function.

default_yaxt

The default y-axis type, which can be overridden by the user. Defaults to NULL, in which case the type is defined by the default plot function.

default_bty

The default background type, which can be overridden by the user. Defaults to "n".

theme

The theme to be applied.

las

The axis option. Defaults to c(1, 2) which makes the labels all horizontal.

...

Additional arguments supplied to plot (e.g., xlim, ylim, cex, etc.)