FunAxisPOSIXct: Axis Function for POSIXct

View source: R/FunAxisPOSIXct.R

FunAxisPOSIXctR Documentation

Axis Function for POSIXct

Description

Make axis, ticks, lables and axistitle in one step for timeseries. Attention: axis.POSIXct is currently only implemented for the x axis.

Usage

FunAxisPOSIXct(
  xtitle = "x axis",
  ytitle = "y axis",
  xline = 2,
  yline = 2,
  xpadj = 0,
  ypadj = 0,
  xcextitle = par("cex"),
  ycextitle = par("cex"),
  xcexlab = par("cex"),
  ycexlab = par("cex"),
  xat = NULL,
  yat = NULL,
  xlabels = TRUE,
  ylabels = TRUE,
  xtick = TRUE,
  ytick = TRUE,
  xtick_lwd = 1.5,
  ytick_lwd = 1.5,
  x_mtext = list(),
  y_mtext = list(),
  x_axis_1 = list(),
  y_axis_1 = list(),
  x_axis_2 = list(),
  y_axis_2 = list(),
  xmt = T,
  ymt = T,
  xmtn = 2,
  ymtn = 2,
  xmtratio = 0.5,
  ymtratio = 0.5,
  xmtbothsides = T,
  ymtbothsides = T,
  xmt_args = list(),
  ymt_args = list(),
  box_lwd = 1.5,
  box_args = list(),
  xtimevec,
  format = ""
)

Arguments

xtitle

x axis title as string

xline

space between x axis title and plotting region in mex

xpadj

space between x axis title and plotting region may be disturbed if you use bquote(). Adapt space with e.g. padj = 0.1, padj = 0 means right or top alignment, and padj = 1 means left or bottom alignment.

xcextitle

x axis title character extension (font size)

xcexlab

x axis labels character extension (font size)

xat

the points at which x axis tick-marks are to be drawn.

xlabels

logical or character vector of labels to be placed at the tickpoints.

xtick

a logical value specifying whether tickmarks and an axis line should be drawn.

xtick_lwd

line width of ticks on the x axis

x_mtext

list of arguments passed to bottom x axis' mtext() e.g. outer, adj, col, font, ...

x_axis_1

list of arguments passed to bottom x axis' axis() e.g. las, pos, outer, font, lty, lwd, lwd.ticks, col, col.ticks, hadj, ...

x_axis_2

list of arguments passed to top x axis' axis()

xmt

logical, should minor ticks on x axis be plotted

xmtn

number of intervals in which to divide the area between major tick marks on the X-axis. Set to 1 to suppress minor tick marks.

xmtratio

ratio of lengths of minor x tick marks to major x tick marks. The length of major tick marks is retrieved from par("tck").

xmtbothsides

should minor ticks be plotted on both x axis (bottom and top)

xmt_args

list of arguments passed to x axis' axis() to plot minor ticks. e.g. lwd, lty, col, ...

box_lwd

line width of box arround the plot

box_args

list of arguments passed to box() to plot box arround plot. e.g. which, lty, ...

xtimevec

vector with all date-times to produce the plot (x argument of the plot function)

format

character vector specifying the way to print the date-time e.g. "%m.%y". See strptime.

y...

each argument for the y axis

Value

axis, ticks, labels and axistitle

Author(s)

Reto Zihlmann

See Also

box, mtext, axis

Examples

library(lubridate)
x <- now() + days(0:7)
y <- rnorm(8)

plot(x,y, type = "l", axes = F, ann = F)
FunAxisPOSIXct(xtimevec = x, format = "%d.%m")

retodomax/FunRZ documentation built on July 30, 2023, 6:42 p.m.