-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathplot_precheck.Rd
88 lines (77 loc) · 2.66 KB
/
plot_precheck.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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Plot_eddy.R
\name{plot_precheck}
\alias{plot_precheck}
\alias{plot_hh}
\title{Plots for Cursory Time Series Data Overview}
\usage{
plot_precheck(
x,
var,
qrange = c(0.005, 0.995),
pch = ".",
cex = 0.5,
alpha.f = 0.5,
units = "months",
interval = "month",
format = "\%b-\%y"
)
plot_hh(
x,
var,
pch = ".",
cex = 1,
alpha.f = 1,
units = "months",
interval = "month",
format = "\%b-\%y"
)
}
\arguments{
\item{x}{A data frame with column names and \code{"timestamp"} column in
POSIXt format.}
\item{var}{A character string. An \code{x} column name of the variable to
plot on y-axis.}
\item{qrange}{A numeric vector of length 2, giving the quantile range of
y-axis.}
\item{pch}{Either an integer specifying a symbol or a single character to be
used as the default in plotting points. See \code{\link{par}} for details.}
\item{cex}{A numerical value giving the amount by which plotting text and
symbols should be magnified relative to the default. See \code{\link{par}}
for details.}
\item{alpha.f}{A numeric value. Factor modifying the color opacity alpha for
plotted points; typically in \code{[0,1]}.}
\item{units}{A character string. One of the units listed: \code{c("secs",
"mins", "hours", "days", "months", "years")}. Can be abbreviated. Specifies
the rounding applied to first and last record in \code{"timestamp"} column
of \code{x} to produce sensible x-axis ticks and labels.}
\item{interval}{An interval of the x-axis ticks. See \code{by} argument of
\code{\link{seq.POSIXt}} for details. Intervals are counted from the first
record in \code{"timestamp"} column of \code{x}.}
\item{format}{A character string defining the date-time information format at
x-axis.see \code{\link{strptime}}.}
}
\description{
Plot half-hourly time series data of selected variable as a scatter plot with
additional settings. Plots are optimized for quick rendering when saved as
PDF files.
}
\details{
\code{plot_precheck} allows to glimpse through the preliminary data with
outlying data removed by defined \code{qrange}. If you do not want to limit
y-axis, set \code{qrange = NULL} or \code{qrange = c(0, 1)} or use
\code{plot_hh}.
\code{plot_hh} provides a glimpse at all available time series data for given
variable.
}
\examples{
set.seed(123)
n <- 17520 # number of half-hourly records in one non-leap year
tstamp <- seq(c(ISOdate(2021,3,20)), by = "30 mins", length.out = n)
x <- data.frame(timestamp = tstamp, H = rf(n, 1, 2, 1))
openeddy::units(x) <- c("", "W m-2")
plot(H ~ timestamp, x)
plot_hh(x, "H")
plot_precheck(x, "H")
plot_precheck(x, "H", units = "days", interval = "2 months", format = "\%d-\%b")
}