Last chance! 50% off unlimited learning
Sale ends in
A scatterplot with additional colored ellipses based on a gaussianity assumption.
ellipsescatter(
x,
y,
groups,
colors = NULL,
pch = 20,
bgcol = "darkgrey",
main = "ellipsescatter",
xlab = NULL,
ylab = NULL,
scalesd = 1,
level = 0.75,
legend.cex = 1,
location = "topright",
...
)
a numeric vector.
a numeric vector.
a list of indices or vector names to be plotted as groups (not necessarily all of x and y).
a character vector of R build-in colors corresponding to the chosen groups.
the plotting character (to be passed to plot).
a R build-in color for non-grouped points.
title(s) of the plot, standard graphics parameter.
x label, standard graphics parameter.
y label, standard graphics parameter.
a numeric value giving the scaling factor for standard deviations in each dimension (defaults to 1).
a numeric value (between 0 and 1) giving the confidence level of a pairwise confidence region.
a numerical value giving the amount by which the added legend should be magnified relative to the default.
the x and y co-ordinates to be used to position the legend (see 'xy.coords').
additional parameters to be passed to points and plot.
# NOT RUN {
x = c(rnorm(50),rnorm(100,2),rnorm(50,4))
y = (x + rnorm(200,0,0.8))*rep(c(1,4,1),c(50,100,50))
x = sign(x)*abs(x)^1.3
groups = list("Green" = 1:50,"Red" = 51:150,"Blue" = 151:200)
colors = c("darkgreen","darkred","darkblue")
ellipsescatter(x,y,groups,colors,location = "topleft")
# }
Run the code above in your browser using DataLab