mschart (version 0.2.4)

chart_data_symbol: Modify symbol

Description

Specify mappings from levels in the data to displayed symbols.

Usage

chart_data_symbol(x, values)

Arguments

x

an ms_chart object.

values

character(num of series): a set of symbol values to map data values to. It is a named vector, the values will be matched based on the names. Possible values are: 'circle', 'dash', 'diamond', 'dot', 'none', 'plus', 'square', 'star', 'triangle', 'x', 'auto'. If it contains only one symbol, this symbol will be associated to all existing series.

See Also

chart_data_fill, chart_data_stroke, chart_data_size

Examples

Run this code
# NOT RUN {
my_scatter <- ms_scatterchart(data = iris, x = "Sepal.Length",
  y = "Sepal.Width",  group = "Species")
my_scatter <- chart_data_fill(my_scatter,
  values = c(virginica = "#6FA2FF", versicolor = "#FF6161", setosa = "#81FF5B") )
my_scatter <- chart_data_stroke(my_scatter,
  values = c(virginica = "black", versicolor = "black", setosa = "black") )
my_scatter <- chart_data_symbol(my_scatter,
  values = c(virginica = "circle", versicolor = "diamond", setosa = "circle") )
# }

Run the code above in your browser using DataCamp Workspace