Vignette For ggplotcli

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

Using ggplotcli with ggplot2

library(plotcli)  

mtcars$cf = as.character(mtcars$cyl)

mtcars_ggplot <- ggplot(mtcars, aes(x = mpg, y = wt)) +  
  geom_point() +  
  geom_smooth(method = "lm", color = "red") +
  labs(title = "Mtcars Dataset with Regression Line",  
       x = "Miles per Gallon",  
       y = "Weight")  

pp = ggplotcli(mtcars_ggplot, braille = FALSE)  
pp$print_plot()  


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.