plotcli_bar {plotcli}R Documentation

Bar plot using plotcli

Description

Create a bar plot using plotcli. Short alias: pclb.

Usage

plotcli_bar(
  y,
  x = NULL,
  plot_width = getOption("plotcli.plot_width", 80),
  plot_height = getOption("plotcli.plot_height", 40),
  x_label = "x",
  y_label = "y",
  color = NULL,
  braille = getOption("plotcli.braille", TRUE),
  name = "barplot",
  ...
)

Arguments

y

A numeric vector of values

x

A vector of categories

plot_width

Width of the plot (default: 80)

plot_height

Height of the plot (default: 40)

x_label

Label for the x-axis (default: "x")

y_label

Label for the y-axis (default: "y")

color

Color of the plot elements (default: NULL)

braille

Use Braille characters for the plot (default: TRUE)

name

Name of the plot element (default: "barplot")

...

Additional arguments passed to the plotcli$new() function

Examples

x <- 1:5
y <- c(10, 15, 8, 12, 6)
plotcli_bar(x, y)

[Package plotcli version 0.1.0 Index]