-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlagged_alignment_plot.Rd
98 lines (82 loc) · 2.69 KB
/
lagged_alignment_plot.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/11-lagged_alignment_plot.R
\name{lagged_alignment_plot}
\alias{lagged_alignment_plot}
\title{Lagged Alignment Plot}
\usage{
lagged_alignment_plot(
object,
x_color = "#631879FF",
y_color = "#E377C2FF",
x_name = "x",
y_name = "y",
which = c("global", "max"),
x_limit = c(1, 1000),
non_matched_point_size = 0.1,
y_point_size = 1,
x_point_size = 3,
integrated = FALSE,
add_connect_line = FALSE,
add_point = FALSE,
time_gap = 4
)
}
\arguments{
\item{object}{An object that includes time series and index attributes required for plotting.}
\item{x_color}{Color for the x series in the plot.}
\item{y_color}{Color for the y series in the plot.}
\item{x_name}{Label for the x series.}
\item{y_name}{Label for the y series.}
\item{which}{Specifies which index to use for alignment ('global' or 'max').}
\item{x_limit}{A numeric vector specifying the x-axis limits.}
\item{non_matched_point_size}{Size of the points for non-matched elements in the plot.}
\item{y_point_size}{Size of the points for y series in the plot.}
\item{x_point_size}{Size of the points for x series in the plot.}
\item{integrated}{Logical, if TRUE the plot will integrate over the index to create average values.}
\item{add_connect_line}{Logical, if TRUE connection lines will be added to the plot.}
\item{add_point}{Logical, if TRUE points will be added to the plot.}
\item{time_gap}{The gap of time between breaks in the x-axis.}
}
\value{
A ggplot object representing the lagged alignment plot.
}
\description{
Generates a plot to visualize the alignment of two time-series data sets at specified lag times.
The function allows for customization of colors, names, point sizes, and various other plotting options.
}
\details{
The function allows for a detailed and nuanced visualization of time-series data. It can integrate over
matched indices to provide average values, or it can highlight exact matches. Options to add connecting lines
or points enhance the visual representation of alignment.
}
\examples{
data("object", package = "laggedcor")
lagged_alignment_plot(object = object,
x_limit = c(1, 1000))
lagged_alignment_plot(object = object,
x_limit = c(1, 10000),
time_gap = 10)
lagged_alignment_plot(
object = object,
x_limit = c(1, 100),
time_gap = 1,
add_point = TRUE,
x_point_size = 1,
y_point_size = 1,
integrated = TRUE,
add_connect_line = TRUE
)
lagged_alignment_plot(
object = object,
x_limit = c(1, 100),
time_gap = 1,
add_point = TRUE,
x_point_size = 1,
y_point_size = 1,
integrated = FALSE
)
}
\author{
Xiaotao Shen
\email{[email protected]}
}