modify_axes_labels: Add or omit the x and y label and tick mark text to a ggplot.

View source: R/utilities.R

modify_axes_labelsR Documentation

Add or omit the x and y label and tick mark text to a ggplot.

Description

Add or omit the x and y label and tick mark text to a ggplot.

Usage

modify_axes_labels(
  g,
  x_label_text = "",
  y_label_text = "",
  show_x_axis = TRUE,
  show_y_axis = TRUE,
  x_axis_label_size = 8,
  x_axis_tick_label_size = 8,
  y_axis_label_size = 8,
  y_axis_tick_label_size = 8
)

Arguments

g

a ggplot object

x_label_text

text for the x label. Only added if 'show_x_axis' is 'TRUE'

y_label_text

text for the x label. Only added if 'show_y_axis' is 'TRUE'

show_x_axis

Logical for whether or not to show the x axis label and tick marks/tick text

show_y_axis

Logical for whether or not to show the y axis label and tick marks/tick text

x_axis_label_size

size of the font to use for the x axis label

x_axis_tick_label_size

size of the font to use for the x axis tick mark labels

y_axis_label_size

size of the font to use for the y axis label

y_axis_tick_label_size

size of the font to use for the y axis tick mark labels

Value

the modified ggplot object


pbs-assess/herringutils documentation built on Jan. 10, 2025, 8:43 a.m.