autoplot.wvar.imu: Plot the Wavelet Variances of IMU Object

Description Usage Arguments Value Examples

View source: R/imu.R

Description

Creates a graph of the wavelet variance for imu object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## S3 method for class 'wvar.imu'
autoplot(object, split = TRUE, CI = TRUE,
  background = "white", transparence = 0.1, line.color = NULL,
  line.type = NULL, point.size = NULL, point.shape = NULL,
  CI.color = NULL, title = "Haar Wavelet Variance Representation",
  title.size = 15, axis.label.size = 13, axis.tick.size = 11,
  axis.x.label = expression(paste("Scale ", tau)),
  axis.y.label = expression(paste("Wavelet Variance ", nu)),
  units = c(bquote(rad^2/s^2), bquote(m^2/s^4)), facet.label.size = 13,
  facet.label.background = "#003C7D33", legend.title = "Axis",
  legend.key.size = 1.3, legend.title.size = 13,
  legend.text.size = 13, scales = "free_y", ...)

Arguments

object

A wvar.imu object

split

A boolean that indicates whether the graphs should be separate (TRUE) or graphed ontop of each other (FALSE).

CI

A boolean that indicates whether the confidence interval should be plotted.

background

A string that determines the graph background. It can be 'grey' or 'white'.

transparence

A double that ranges from 0 to 1 that controls the transparency of the confidence interval.

line.color

A vector of string that indicates the color of the line drawn (e.g. black, blue, red, etc.)

line.type

A vector of string that indicates the type of line (e.g. solid, dotted, etc.)

point.size

A vector of integer that indicates the size of points on lines.

point.shape

A vector of integer that indicates the shape of points on lines.

CI.color

A string that indicates the color of the confidence interval (e.g. black, red, #003C7D, etc.)

title

A string that indicates the title of the graph.

title.size

An integer that indicates the size of title.

axis.label.size

An integer that indicates the size of label.

axis.tick.size

An integer that indicates the size of tick mark.

axis.x.label

A string that indicates the label on x axis.

axis.y.label

A string that indicates the label on y axis.

units

A two-element vector indicating the units of gyroscope and accelerometer sensor. Set it to NULL if units are not needed.

facet.label.size

An integer that indicates the size of facet label.

facet.label.background

A string that indicates the background color of the facet label.

legend.title

A string that indicates the title of legend. It is onlly used when split = FALSE.

legend.key.size

A double that indicates the size of key (in centermeters) on legend. It is onlly used when split = FALSE.

legend.title.size

An integer that indicates the size of title on legend. It is onlly used when split = FALSE.

legend.text.size

An integer that indicates the size of key label on legend. It is onlly used when split = FALSE.

scales

Same as scales in facet_grid() in ggplot2 package: should scales be fixed ("fixed"), free ("free"), or free in one dimension ("free_x", "free_y"). The default is "free_y" in this function.

...

Additional options.

Value

A panel containing the graph of an IMU sensor.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
if(!require("imudata")){
   install_imudata()
   library("imudata")
}

data(imu6)
test = imu(imu6, gyros = 1:3, accels = 4:6, freq = 100)
df = wvar.imu(test)

## Plot in split way
autoplot(df, split = T)
autoplot(df, split = T, CI = F)
autoplot(df, split = T, CI = T, line.color = c('black', 'black'), title.size = 18)

## Plot in combined way
autoplot(df, split = F)
autoplot(df, split = F, line.color = c('black', 'green', 'red'), 
         CI.color = c('black', 'green', 'red'))

## End(Not run)

SMAC-Group/gmwm documentation built on Sept. 11, 2021, 10:06 a.m.