glottospotlight {glottospace} | R Documentation |
Highlight certain data points in visualizations
Description
This function creates two separate color scales: one for points to highlight, and a second for the remaining background points. It also creates a legend. This is useful for preparing the data for visualizations such as maps or other plots.
Usage
glottospotlight(
glottodata,
spotcol,
spotlight,
spotcontrast = NULL,
spotpal = NULL,
bgcontrast = NULL,
bgpal = NULL
)
Arguments
glottodata |
User-provided glottodata |
spotcol |
Name of the column that contains the data to put in the spotlights (as well as remaining background data). |
spotlight |
Selection of data to put in the spotlights. |
spotcontrast |
Optional column to contrast between data points in the spotlight. |
spotpal |
color palette for spotligbht points |
bgcontrast |
Optional column to contrast between background data points |
bgpal |
color palette for background points (default is grays) |
Value
A glottodata object with columns added to be used in visualization.
Examples
glottodata <- glottofilter(country = c("Netherlands", "Germany", "Belgium") )
glottodata <- glottospotlight(glottodata = glottodata, spotcol = "country",
spotlight = "Netherlands", spotcontrast = "name")
glottomap(glottodata, color = "color")
[Package glottospace version 0.0.112 Index]