Visualize College Basketball Conference Logos in ggplot2
Source:R/geom_cbb_conferences.R
geom_cbb_conferences.Rd
geom_cbb_conferences
creates a ggplot2 layer that plots college basketball conference logos
in place of points. The layer requires x
and y
aesthetics and a valid conference name.
The width
parameter can be used to adjust the size of the logos. Logos can be depicted as
either normal
or wordmark
by setting the logo_type
parameter.
Usage
geom_cbb_conferences(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
...,
na.rm = FALSE,
show.legend = FALSE,
inherit.aes = TRUE,
logo_type = "normal",
highlight_conferences = NULL,
highlight_method = "alpha",
highlight_alpha = 0.5
)
Arguments
- mapping
Set of aesthetic mappings created by
ggplot2::aes()
orggplot2::aes_()
. If specified andinherit.aes = TRUE
(the default), it is combined with the default mapping at the top level of the plot. You must supplymapping
if there is no plot mapping.- data
The data to be displayed in this layer. If
NULL
, the default, the data is inherited from the plot data as specified in the call toggplot()
.- stat
The statistical transformation to use on the data for this layer, as a string.
- position
Position adjustment, either as a string, or the result of a call to a position adjustment function.
- ...
Other arguments passed on to
layer()
.- na.rm
If
FALSE
, the default, missing values are removed with a warning. IfTRUE
, missing values are silently removed.- show.legend
Logical. Should this layer be included in the legends?
NA
, the default, includes if any aesthetics are mapped.FALSE
never includes, andTRUE
always includes.- inherit.aes
If
FALSE
, overrides the default aesthetics, rather than combining with them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g.borders()
.- logo_type
Character specifying the type of logos to plot (
"normal"
or"wordmark"
).- highlight_conferences
Vector of conference names to highlight.
- highlight_method
Method of highlighting (
"alpha"
,"color"
, or"both"
).- highlight_alpha
Alpha value for highlighted conferences.