Learn R Programming

timelineR (version 1.0.0)

generate_color_mapping: Generate color mapping for all plots

Description

When all the plots have the same set of values, instead of typing the color mapping for all plots, default color to value mapping can be given which will generate the color mapping for all the plots based on the unique values present in each column

Usage

generate_color_mapping(df, default_color_mapping)

Arguments

df

Data frame to be plotted using plot_timeline

default_color_mapping

Value to color mapping for all the plots in the data frame. ex: default_color_mapping <- c("0" = "#BCBEC0", "1" = "#1279C6")