get_named_colors: Get named colors for plotting (plotly)

View source: R/get_named_colors.R

get_named_colorsR Documentation

Get named colors for plotting (plotly)

Description

Internal function used by plotly functions. Extracts the colors that should be used in the plot from platformInfo (contained in the scenario). Alternatively, you can set useDefaultcolors = TRUE. '

Usage

get_named_colors(scenario, idList, defaultColorList, useDefaultColors = FALSE)

Arguments

scenario

must contain either or both: targetTruth, ownShipTruth

idList

list of truthIDs or trackNums

defaultColorList

list of default colors - must be as long as idList and in the same order (if you care)!

useDefaultColors

if true, this function uses default color scheme (rather than colors in platformInfo). This has no effect if platformInfo is not present in the scenario (b/c we have to use default colors anyway) (default=FALSE)

Value

plotly object


battleVerse/scenarioMaker documentation built on July 16, 2024, 4:21 a.m.