plot_sample: It makes a plot by sampling (e.g. monthly) the variables 'x'...

Description Usage Arguments Value Note See Also Examples

View source: R/plot.sample.R

Description

It makes a plot by sampling (e.g. monthly) the variables x and y

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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), ...)

Arguments

x

vector of input data

y

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]

xlim, ylim, xlab, ylab

see plot.default (Graphic)

legend_position

legend position. Default is "topleft". See legend.

pch

integer single or multi values for pch (see plot.default). Default is 1.

col

integer single or multi values for col (see plot.default). Default is 1.

col_max

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 .

col_min

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 .

origin

date of the first row of x. See normalizeGaussian_severalstations.

sample

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.

xhist

frequency histogram for x. Default is hist(x,breaks=breaks,plot=FALSE). If it is NULL, no marginal histograms appear.

yhist

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),

axes

see barplot

step, prec

see normalizeGaussian_severalstations

breaks

see hist

origin_x

see normalizeGaussian_severalstations. Default value is set equal to origin.

origin_data

normalizeGaussian_severalstations. Default value is set equal to origin.

data

normalizeGaussian_severalstations. Default value is set equal to x.

color

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.

gray

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.

sort

logical value. If TRUE, x and y are sorted and a Q-Q plot is presented. Deafault is FALSE.

valmin_x

numerical threshold value over which the variable x is plotted. It is enabled only if sort is set TRUE.

valmin_y

numerical threshold value over which the variable y is plotted. It is enabled only if sort is set TRUE.

valmin

numerical threshold value for valmin_y and valmin_x if there are not specified.

abline

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), ...)

Value

0 in case of success

Note

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.

See Also

plot.default,extractmonths, see normalizeGaussian_severalstations

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 

library(lubridate)
data(trentino)
plot_sample(x=TEMPERATURE_MIN$T0090,sample="monthly",
 origin="1958-1-1",axes=FALSE,xlab="Tn [ degC]",
 ylab="x")

set.seed(123456) 
z <- rexp(10000,rate=0.5) 
x <- normalizeGaussian(x=z,data=z) 
plot_sample(x=z,xlab="z",ylab="x")

## End(Not run)

RMAWGEN documentation built on Dec. 12, 2019, 9:07 a.m.