Skip to contents

Make x, y, color plot title

Usage

make_x_y_col_facet_title(x, y, color, facets)

Arguments

x

x variable

y

y variable

color

color variable

Value

String for plot title

Examples

diamonds <- ggplot2::diamonds
mini_dmnds <- diamonds[sample(nrow(diamonds), 10000), ]
gg_scatter_color(
  df = mini_dmnds,
  x_var = "carat",
  y_var = "price",
  col_var = "cut",
  alpha = 1 / 3,
  size = 2
) +
ggplot2::labs(title =
  make_x_y_color_title(
    x = "carat",
    y = "price",
   color = "cut"))