Description Usage Arguments Value Author(s) References Examples
Draws a bubble plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
data |
a data frame. |
id |
character, name of the ID variable. |
x |
character, name of the x-axis variable. |
y |
character, name of the y-axis variable. |
col |
character, name of variable on the color axis. |
size |
character, name of variable on the size axis. |
text.col |
character, name of variable for text colors. |
text.size |
integer, text font size. |
scale.size |
logical; if |
labels |
character vector, variable labels (on legend and axis). |
mx |
numeric, x-coordinate of the vertical axis; default is the mean value of |
my |
numeric, y-coordinate of the horizontal axis; default is the mean value of |
mcol |
numeric, midpoint of the diverging scale (see |
title |
character, plot title. |
repel |
logical; if |
text.legend |
logical; if |
A ggplot2
object
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 | X <- with(Tbox, data.frame(T=Team, P2p=P2p, P3p=P3p, FTp=FTp, AS=P2A+P3A+FTA))
labs <- c("2-point shots (% made)","3-point shots (% made)",
"free throws (% made)","Total shots attempted")
bubbleplot(X, id="T", x="P2p", y="P3p", col="FTp",
size="AS", labels=labs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.