Description Usage Arguments Value Author(s) References See Also Examples
Draws two-dimensional plots for multidimensional scaling (MDS) from a 'MDSmap' object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
x |
an object of class |
z.var |
character vector; defines the set of variables (available in the |
level.plot |
logical; if TRUE, draws a level plot, otherwise draws a scatter plot (not active if |
title |
character, plot title. |
labels |
character vector, labels for (x, y) points (only for single scatter plot). |
repel_labels |
logical; if |
text_label |
logical; if |
subset |
logical vector, to select a subset of points to be highlighted. |
col.subset |
character, color for the subset of points. |
zoom |
numeric vector with 4 elements; |
palette |
color palette. |
contour |
logical; if |
ncol.arrange |
integer, number of columns when arranging multiple grobs on a page. |
... |
other graphical parameters. |
A single ggplot2
plot or a list of ggplot2
plots
Marco Sandri, Paola Zuccolotto, Marica Manisera (basketballanalyzer.help@unibs.it)
P. Zuccolotto and M. Manisera (2020) Basketball Data Science: With Applications in R. CRC Press.
1 2 3 4 5 6 7 8 | data <- data.frame(Pbox$PTS, Pbox$P3M, Pbox$P2M, Pbox$OREB + Pbox$DREB, Pbox$AST,
Pbox$TOV,Pbox$STL, Pbox$BLK)
names(data) <- c('PTS','P3M','P2M','REB','AST','TOV','STL','BLK')
selp <- which(Pbox$MIN >= 1500)
data <- data[selp,]
id <- Pbox$Player[selp]
mds <- MDSmap(data)
plot(mds, labels=id, z.var="P2M", level.plot=FALSE, palette=rainbow)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.