Vignette For plotcli R6 class usage

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Using plotcli convenience wrappers

Density plot

library(plotcli)
# Generate sample data
sample_data <- rnorm(1000, mean = 5, sd = 2)

# Create a density plot
plotcli_density(sample_data, color = "blue", braille = TRUE)

Histogram

# Generate sample data
sample_data <- rnorm(1000, mean = 5, sd = 2)

# Create a histogram
plotcli_histogram(sample_data, color = "yellow")

Scatterplot

# Create a scatter plot
plotcli_scatter(x = iris$`Sepal.Width`, y = iris$`Sepal.Length`, color = "magenta", braille = FALSE)

Lineplot

# make sin 
x <- seq(0, 2*pi, length.out = 50)
y <- sin(x)

# Create a line plot
plotcli_line(x = x, y = cos(y), color = "green")
plotcli_line(x = x, y = x, color = "magenta", braille = FALSE)


Try the plotcli package in your browser

Any scripts or data that you put into this service are public.

plotcli documentation built on May 29, 2024, 6:22 a.m.