plot.denReg {frechet}R Documentation

Plots for Fréchet regression for univariate densities.

Description

Plots for Fréchet regression for univariate densities.

Usage

## S3 method for class 'denReg'
plot(
  x,
  obj = NULL,
  prob = NULL,
  xlab = NULL,
  ylab = NULL,
  main = NULL,
  ylim = NULL,
  xlim = NULL,
  col.bar = TRUE,
  widrt = 4,
  col.lab = NULL,
  nticks = 5,
  ticks = NULL,
  add = FALSE,
  pos.prob = 0.9,
  colPalette = NULL,
  ...
)

Arguments

x

A denReg object, result of DenFMean, GloDenReg or LocDenReg.

obj

An integer indicating which output to be plotted; 1, 2, 3, 4, and 5 for dout, qout, din, qin, and reference chart for qout, respectively - default: 1.

prob

A vector specifying the probability levels for reference chart if obj is set to 5. Default: c(0.05,0.25,0.5,0.75,0.95).

xlab

Character holding the label for x-axis; default: "Probability" when obj is 2 or 4, "" when obj is 1 or 3, "x" when obj is 5.

ylab

Character holding the label for y-axis; default: "Quantile" when obj is 2, 4, or 5, and "Density" when obj is 1 or 3.

main

Character holding the plot title; default: NULL.

ylim

A numeric vector of length 2 holding the range of the y-axis to be drawn; default: automatically determined by the input x.

xlim

A numeric vector of length 2 holding the range of the x-axis to be drawn; default: automatically determined by the input x.

col.bar

A logical variable indicating whether a color bar is presented on the right of the plot - default: TRUE.

widrt

A scalar giving the width ratio between the main plot and the color bar - default: 4.

col.lab

A character giving the color bar label.

nticks

An integer giving the number of ticks used in the axis of color bar.

ticks

A numeric vector giving the locations of ticks used in the axis of color bar; it overrides nticks.

add

Logical; only works when obj is 5. If TRUE add to an already existing plot. Taken as FALSE (with a warning if a different value is supplied) if no graphics device is open.

pos.prob

FALSE or a scalar less than 0 or larger than 1. FALSE: no probability levels will be labeled on the quantile curves; a scalar between 0 and 1: indicating where to put the probability levels along the curves on growth charts: 0 and 1 correspond to left and right ends, respectively. Default: 0.9.

colPalette

A function that takes an integer argument (the required number of colors) and returns a character vector of colors interpolating the given sequence (e.g., heat.colors, terrain.colors and functions created by colorRampPalette). Default is colorRampPalette(colors = c("pink","royalblue")) for more than one curves and "black" otherwise.

...

Can set up lty, lwd, etc.

Value

No return value.

Note

see DenFMean, GloDenReg and LocDenReg for example code.


[Package frechet version 0.3.0 Index]