add_preassigned_scales: Take existing data frame and associate colors with values

View source: R/Plot_Labels.R

add_preassigned_scalesR Documentation

Take existing data frame and associate colors with values

Description

Take existing data frame and associate colors with values

Usage

add_preassigned_scales(plot, labels_and_colors, var = "None")

Arguments

plot

The existing ggplot, needed to add more than one scale

labels_and_colors

A csis360 lookup data.frame with factor information

var

The name of the column, default to none for generic colors

Details

labels_and_colors is a data.frame produced by the csis360 package, see prepare_labels_and_colors drawing from lookup table that preassign labels, order, and color to the expected values of a column.

Value

A plot with added color and fill scales for the column passed

Examples

plot<-add_preassigned_scales(plot,labels_and_colors,"pricing.mechanism.sum")


CSISdefense/csis360 documentation built on April 29, 2024, 5:30 p.m.