Helper function to ignore NULL inputs when adding aesthetics to a ggplot.

get_aesthetics(
  x_str = NULL,
  y_str = NULL,
  color_str = NULL,
  fill_str = NULL,
  group_str = NULL,
  linetype_str = NULL
)

Arguments

x_str

Character string specifying the name of the data column to plot on the x-axis.

y_str

Character string specifying the name of the data column to plot on the y-axis.

color_str

Character string specifying the name of the data column to use for the color aesthetic.

fill_str

Character string specifying the name of the data column to use for the fill aesthetic.

group_str

Character string specifying the name of the data column to use for the group aesthetic.

linetype_str

Character string specifying the name of the data column to use for the linetype aesthetic.

Value

A ggplot2::aes() object.