plot.variability {BasketballAnalyzeR} | R Documentation |
Plots a variability diagram from a 'variability' object
Description
Plots a variability diagram from a 'variability' object
Usage
## S3 method for class 'variability'
plot(
x,
title = "Variability diagram",
ylim = NULL,
ylab = NULL,
size.lim = NULL,
max.circle = 25,
n.circle = 4,
leg.brk = NULL,
leg.pos = "right",
leg.just = "left",
leg.nrow = NULL,
leg.title = NULL,
leg.title.pos = "top",
...
)
Arguments
x |
an aobject of class |
title |
character, plot title. |
ylim |
numeric vector of length two, y-axis limits. |
ylab |
character, y-axis label. |
size.lim |
numeric vector of length two, set limits of the bubbles' size scale (see |
max.circle |
numeric, maximum size of the |
n.circle |
integer; if |
leg.brk |
numeric vector, breaks for bubbles' size legend (see |
leg.pos |
character or numeric vector of length two, legend position; available options |
leg.just |
character or numeric vector of length two; anchor point for positioning legend inside plot ( |
leg.nrow |
integer, number of rows of the bubbles' size legend. |
leg.title |
character, title of the bubbles' size legend. |
leg.title.pos |
character, position of the legend title; available options: |
... |
other graphical parameters. |
Value
A ggplot2
object
Author(s)
Marco Sandri, Paola Zuccolotto, Marica Manisera (basketballanalyzer.help@unibs.it)
References
P. Zuccolotto and M. Manisera (2020) Basketball Data Science: With Applications in R. CRC Press.
See Also
Examples
Pbox.BC <- subset(Pbox, Team=="Oklahoma City Thunder" & MIN >= 500,
select=c("P2p","P3p","FTp","P2A","P3A","FTA"))
out <- variability(data=Pbox.BC, data.var=c("P2p","P3p","FTp"),
size.var=c("P2A","P3A","FTA"), weight=TRUE)
plot(out, leg.brk=c(10,25,50,100,500,1000), max.circle=30)