Learn R Programming

tidyplots (version 0.2.2)

remove_x_axis: Remove x-axis or parts of it

Description

Remove x-axis or parts of it

Usage

remove_x_axis(plot)

remove_x_axis_line(plot)

remove_x_axis_ticks(plot)

remove_x_axis_labels(plot)

remove_x_axis_title(plot)

Value

A tidyplot object.

Arguments

plot

A tidyplot generated with the function tidyplot().

Examples

Run this code
# Before removing
study |>
  tidyplot(x = treatment, y = score, color = treatment) |>
  add_mean_bar()

# After removing
study |>
  tidyplot(x = treatment, y = score, color = treatment) |>
  add_mean_bar() |>
  remove_x_axis_line()

study |>
  tidyplot(x = treatment, y = score, color = treatment) |>
  add_mean_bar() |>
  remove_x_axis_ticks()

study |>
  tidyplot(x = treatment, y = score, color = treatment) |>
  add_mean_bar() |>
  remove_x_axis_labels()

study |>
  tidyplot(x = treatment, y = score, color = treatment) |>
  add_mean_bar() |>
  remove_x_axis_title()

study |>
  tidyplot(x = treatment, y = score, color = treatment) |>
  add_mean_bar() |>
  remove_x_axis()

Run the code above in your browser using DataLab