cplot: Convenience function for ggplot2

View source: R/functions.R

cplotR Documentation

Convenience function for ggplot2

Description

This provides a quick way to generate a plot with ggplot2 using theme_cody and specifying several labels, as well as the font size, directly in the function call.

Usage

cplot(..., title = "", x.label = "", y.label = "", fill.label = "",
  base.size = 14)

Arguments

title

Title to print on the plot (optional)

x.label

Label for x axis (optional)

y.label

Label for y axis (optional)

fill.label

Label for fill legend (optional)

base.size

Base font size (optional)

Examples

cplot(iris, aes(x=Sepal.Length, y = Sepal.Width),
 title = "Iris Sepal Dimensions",
 x.label = "Length (cm)",
 y.label = "Width (cm)",
 base_size = 12) +
 geom_point()

codybj/codyverse documentation built on June 12, 2022, 4:15 p.m.