actel (version 1.1.0)

plotTimes: Print circular graphics for time series.

Description

Wraps functions adapted from the circular R package.

Usage

plotTimes(
  times,
  night = NULL,
  col,
  alpha = 0.8,
  title = "",
  mean.dash = TRUE,
  mean.range = TRUE,
  rings = TRUE,
  file,
  width,
  height,
  bg = "transparent",
  ncol,
  legend.pos = c("auto", "corner", "bottom"),
  ylegend,
  xlegend,
  xjust = c("auto", "centre", "left", "right"),
  expand = 0.95,
  cex = 1
)

Arguments

times

A list of of time vectors (each vector will be plotted as a series).

night

A vector of two times defining the start and stop of the night period (in HH:MM format).

col

A vector of colour names to paint each time series (colours will be added transparency).

alpha

A value between 0 and 1 for the opacity of each layer (defaults to 0.8).

title

A title for the plot.

mean.dash

Logical: Should the mean value be displayed on the plot's edge?

mean.range

Logical: Should the SEM be displayed? (only relevant if mean.dash = TRUE)

rings

Logical: Should inner plot rings be displayed?

file

A file name to save the plot to. Leave NULL to plot on active graphics device. Available file extensions: .svg, .pdf, .png and .tiff.

height, width

The height and width of the output file. Use inches for .pdf and .svg files or pixels for .png and .tiff files.

bg

The colour of the plot background. Defaults to "transparent".

ncol

The number of columns in which to set the legend items. By default, actel decides the number of columns based on the number of data series to be plotted.

legend.pos

Where should the legend be drawn? By default, actel decides whether to plot the legend in the corner of the plot at the bottom the plot depending on the number of data series to plot. Possible values: 'auto', 'corner', 'bottom'.

ylegend

Adjustment to the vertical positioning of the legend. Only relevant if the legend is being drawn in the corner of the plot.

xlegend

Adjustment to the horizontal positioning of the legend.

xjust

How the legend is to be justified when the legend is drawn at the bottom a the plot. One of 'auto' (i.e. let actel decide the best adjustment), 'left', 'centre', or 'right'.

expand

Parameter that controls the size of the plotted circle. Defaults to 0.95. Larger values expand the circle, while smaller values shrink the circle.

cex

A numerical vector giving the amount by which plotting characters and symbols should be scaled relative to the default. When saving the plot in a vectorial form, it is recommended to change the height and width arguments rather than the cex.

Value

A circular plot

Details

For more details about the original functions, visit the circular package homepage at https://github.com/cran/circular

Examples

Run this code
# NOT RUN {
# The output of timesToCircular can be used as an input to plotTimes.
x <- getTimes(example.results, location = "A1", n.events = "first", event.type = "arrival")
times <- timesToCircular(x)

# plot times
plotTimes(times)

# A night period can be added with 'night'
plotTimes(times, night = c("20:00", "06:00"))

# }

Run the code above in your browser using DataLab