plcoord: Determines Values for Plotting with Limited "Inner" Plot Range

Description

For plots with an "inner plot range" (see Details) this function converts the data values to the coordinates in the plot

Usage

1
plcoord(x, range = NULL, limfac = 3, limext = 0.1)

Arguments

x

data to be represented

range

vector of 2 elements giving the inner plot range. Data beyond the given interval will be non-linearly transformed to fit within the (outer) plot margins. Defaults to robrange(x, fac=fac).

limfac

factor used to determine the default of range

limext

factor for extending the range to determine the outer plot range

Details

When plotting data that contain outliers, the non-outlying data is represented poorly. Rather than simply clipping outliers, one can split the plotting area into an inner region, where the (non-outlying) data is plotted as usual, and a plot area margin, in which outliers are represented on a highly non-linear scale that allows to display them all.

This function converts the data to the coordinates used in the graphical display, and also returns the inner range for plotting.

Value

vector of coordinates used for plotting, that is, unchanged x values for those within the range and transformed values for those outside.

Attributes:

attr(,"range")

the "inner" plot range, either the argument range or the values determined by default.

attr(,"nmod")

the number of modified observations

Author(s)

Werner Stahel

See Also

robrange

Examples

1
2
3
4
5
  x <- c(rnorm(20),rnorm(3,5,20))
  xmod <- plcoord(x)
  plot(x,xmod)
  plot(xmod)
  abline(h=attr(xmod,"range"),lty=3, lwd=2)

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.