Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

style_plot

Create styles for single-case data plots


Description

The style_plot function is used to create graphical styles for a single-case plot

Usage

style_plot(style = "default", ...)

style_plotSC(...)

style.plotSC(...)

Arguments

style

Predefined styles.

...

Further arguments passed to the plot command.

Details

style_plot("") will return a list of predefined styles. Predefined styles can be combined style_plot(style = c("grid2", "tiny")) where settings of a latter style overwrite settings of the former. Additional style paramters are set following the style argument and can be combined with those: style_plot(style = "grid2", fill = "grey50", pch = 18).

Value

Returns a list to be provided or the style argument of the plot function.

  • fill If set, the area under the line is filled with the given color (e.g., fill = "tomato"). Use the standard R command colors() to get a list of all possible colours. fill is empty by default.

  • annotations A list of parameters defining annotations to each data point. This adds the score of each MT to your plot.

    • "pos" Position of the annotations: 1 = below, 2 = left, 3 = above, 4 = right.

    • "col" Color of the annotations.

    • "cex" Size of the annotations.

    • "round" Rounds the values to the specified decimal.

  • annotations = list(pos = 3, col = "brown", round = 1) adds scores rounded to one decimal above the data point in brown color to the plot.

  • "lwd" Width of the plot line. Default is lwd = 2.

  • "pch" Point type. Default is pch = 17 (triangles). Other options are for example: 16 (filled circles) or "A" (uses the letter A).

  • "main" Main title of the plot.

  • "mai" Sets the margins of the plot.

  • "bty" Shape of the frame surrounding the inner plot

  • "fill.bg" Backgroundcolor of the plot.

  • "grid" Color of a grid.

  • "text.ABlag" Text displayed between phases.

  • "cex.axis" Size of the axis annotations

  • "las" Orientation of the axis annotations

  • "col.lines" Color of the lines

  • "col.dots" Color of the dots

  • "col.seperator" Color of the phase seperating lines

  • "col.bg" Color of the outer plot

  • "col" General color setting for the plot

  • "col.text" Color of all labels of the plot.

Author(s)

Juergen Wilbert

See Also

Examples

newstyle <- style_plot(style = "default")
newstyle$text.ABlag <- c("START","END")
newstyle$col.dots <- ""
newstyle$annotations <- list(cex = 0.6, col = "grey10", offset = 0.4)
plot(exampleABC, style = newstyle)

scan

Single-Case Data Analyses for Single and Multiple Baseline Designs

v0.51
GPL
Authors
Juergen Wilbert [aut, cre], Timo Lueke [aut]
Initial release
2021-2-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.