x
and y
R/plot.sample.R
plot_sample.Rd
It makes a plot by sampling (e.g. monthly) the variables x
and y
plot_sample(
x,
y = normalizeGaussian_severalstations(x = as.data.frame(x), data = as.data.frame(data),
origin_x = origin_x, origin_data = origin_data, sample = sample, step = step, prec =
prec)[, 1],
xlim = range(x, na.rm = TRUE),
legend_position = "topleft",
ylim = range(y, na.rm = TRUE),
pch = 1,
col = 1,
col_max = 0.9,
col_min = 0.1,
origin,
sample = NULL,
xhist = hist(x, breaks = breaks, plot = FALSE),
yhist = hist(y, breaks = breaks, plot = FALSE),
axes = FALSE,
step = NULL,
prec = 1e-04,
breaks = 50,
origin_x = origin,
origin_data = origin,
data = x,
xlab = "",
ylab = "",
color = FALSE,
gray = TRUE,
sort = FALSE,
valmin_x = valmin,
valmin_y = valmin,
valmin = -9999,
abline = c(0, 1),
...
)
vector of input data
vector of second input data. Default is normalizeGaussian_severalstations(x=as.data.frame(x),data=as.data.frame(data),origin_x=origin_x,origin_data=origin_data,sample=sample,step=step,prec=prec)[,1]
see plot.default
(Graphic)
legend position. Default is "topleft"
. See legend
.
integer single or multi values for pch
(see plot.default
). Default is 1.
integer single or multi values for col
(see plot.default
). Default is 1.
maximum value for color scale to apply to rainbow
or rainbow
. Utilized if col
is not a vector and both gray
or color
are TRUE
. Default is 0.9 .
minimum value for color scale to apply to rainbow
or rainbow
. Utilized if col
is not a vector and both gray
or color
are TRUE
. Default is 0.1 .
date of the first row of x
. See normalizeGaussian_severalstations
.
string character containg informatio how to sample x
and y
. Default is NULL. If NULL
no sampling is done.see normalizeGaussian_severalstations
. Only NULL
or "monthly"
options are implemented.
frequency histogram for x
. Default is hist(x,breaks=breaks,plot=FALSE)
. If it is NULL
, no marginal histograms appear.
frequency histogram for y
. Default is hist(y,breaks=breaks,plot=FALSE)
. If it is NULL
, no marginal histograms appear. =hist(y,breaks=breaks,plot=FALSE),
see barplot
see hist
see normalizeGaussian_severalstations
. Default value is set equal to origin
.
normalizeGaussian_severalstations
. Default value is set equal to origin
.
normalizeGaussian_severalstations
. Default value is set equal to x
.
logical value. If TRUE
and if col
is unspecified, a color scale is applied according to col_min
and col_max
(see rainbow
). Default is FALSE
.
logical value. If TRUE
and if col
is unspecified, a color scale is applied according to col_min
and col_max
(see gray
). Default is TRUE
.
logical value. If TRUE
, x
and y
are sorted and a Q-Q plot is presented. Deafault is FALSE
.
numerical threshold value over which the variable x
is plotted. It is enabled only if sort
is set TRUE
.
numerical threshold value over which the variable y
is plotted. It is enabled only if sort
is set TRUE
.
numerical threshold value for valmin_y
and valmin_x
if there are not specified.
arguments for abline
function. Default is c(0,1)
. If it is NULL
, abline
is disabled and not called.
see graphical parametes on plot.default
@usage plot_sample(x, y = normalizeGaussian_severalstations(x = as.data.frame(x), data = as.data.frame(data), origin_x = origin_x, origin_data = origin_data, sample = sample, step = step, prec = prec)[, 1], xlim = range(x, na.rm = TRUE), legend_position = "topleft", ylim = range(y, na.rm = TRUE), pch = 1, col = 1, col_max = 0.9, col_min = 0.1, origin, sample = NULL, xhist = hist(x, breaks = breaks, plot = FALSE), yhist = hist(y, breaks = breaks, plot = FALSE), axes = FALSE, step = NULL, prec = 1e-04, breaks = 50, origin_x = origin, origin_data = origin, data = x, xlab = "", ylab = "", color = FALSE, gray = TRUE, sort = FALSE, valmin_x = valmin, valmin_y = valmin, valmin = -9999, abline = c(0, 1), ...)
0 in case of success
It makes a plot betwee x
and y
and shows thair respective probibilty histograms.
If y
is missing, it is automatically calculated as one-dimensional Gaussianization of x
through the function normalizeGaussian_severalstations
.