Description Usage Arguments Details Value Examples
Draws scatter plots.
1 2 3 4 |
x |
x-axis values. |
y |
y-axis values. |
points_labs |
If not |
createWindow |
If |
main |
Plot title. If |
color |
Optional character, factor or numeric vector giving the color of the observations. If |
pch |
Optional character, factor or numeric vector giving the pch of the observations. |
size |
The points size. |
cex.lab |
The size of points labels. |
xlab |
If not |
ylab |
If not |
legend_pch |
If not |
legend_color |
If not |
drawEllipses |
If |
typeEl |
The type of ellipse, either "norm" (multivariate normal distribution), "t" (multivariate t-distribution) and "euclid" draws a circle with the radius equal to level, representing the euclidean distance from the center. |
levelEl |
The confidence level at which to draw an ellipse. |
If type.obj
is 'OPLSDA'
, axes = 1 represents the predictive score vector, axes = 2 represents the first orthogonal score vector, etc.
A score or loading plot in the current device.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | x <- c(1:20)
y <- sample(20)
colors <- c(rep(1,10), rep(2,10))
points_pch <- c(rep(17,10), rep(18,10))
labels <- as.character(c(1:20))
# automatic legend names and values assignment
ScatterPlot(x = x, y = y, points_labs = labels, createWindow=FALSE,
main = 'Scatter plot', color = colors, pch = points_pch,
xlab = "x axis", ylab = "y axis")
# decide on the color or pch values
legend_color = c(rep("A", 10), rep("B", 10))
legend_pch = c(rep("C", 10), rep("D", 10))
ScatterPlot(x = x, y = y, points_labs=labels, createWindow=FALSE,
main = 'Scatter plot', color = colors, pch = points_pch,
xlab = "x axis", ylab = "y axis",
legend_pch = legend_pch,legend_color=legend_color)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.