### Install tinyplot from CRAN Source: https://grantmcdermott.com/tinyplot Install the stable version of the tinyplot package from CRAN. ```r install.packages("tinyplot") ``` -------------------------------- ### Install tinyplot from R-universe Source: https://grantmcdermott.com/tinyplot Install the latest development version of the tinyplot package from R-universe. ```r install.packages("tinyplot", repos = "https://grantmcdermott.r-universe.dev") ``` -------------------------------- ### Apply Built-in Theme for Plot Customization Source: https://grantmcdermott.com/tinyplot Apply a 'clean2' theme to customize plot aesthetics. Themes are persistent and affect subsequent plots. ```r tinytheme("clean2") plt(Sepal.Length ~ Petal.Length | Species, data = iris) plt_add(type = "lm") ``` -------------------------------- ### Load tinyplot library Source: https://grantmcdermott.com/tinyplot Load the tinyplot package into the R session to use its functions. ```r library(tinyplot) ``` -------------------------------- ### Reset Theme to Default Source: https://grantmcdermott.com/tinyplot Reset the applied tinyplot theme back to the default settings. ```r # reset the theme tinytheme() ``` -------------------------------- ### Shorthand Alias with Plot Enhancements Source: https://grantmcdermott.com/tinyplot Utilize the `plt()` shorthand alias for `tinyplot()` and add an 'lm' layer with aesthetic tweaks like palette, point character, grid, and frame. ```r plt( Sepal.Length ~ Petal.Length | Species, data = iris, palette = "dark", pch = 16, grid = TRUE, frame = FALSE ) plt_add(type = "lm") ``` -------------------------------- ### Grouped Density Plot with Customization Source: https://grantmcdermott.com/tinyplot Generate a grouped density plot using the `plt()` function with specified data, type, fill aesthetic, and plot titles. ```r plt( ~ Petal.Length | Species, data = iris, type = "density", fill = "by", main = "Distribution of petal lengths", sub = "Grouped by species" ) ``` -------------------------------- ### Grouped Scatterplot with Automatic Legend Source: https://grantmcdermott.com/tinyplot Create a grouped scatterplot with an automatic legend using either the formula or atomic interface. The formula interface is generally preferred for its conciseness. ```r # with(iris, tinyplot(x = Petal.Length, y = Sepal.Length, by = Species)) # atomic tinyplot(Sepal.Length ~ Petal.Length | Species, data = iris) # formula ``` -------------------------------- ### Faceted Scatterplot with Gradient Legend Source: https://grantmcdermott.com/tinyplot Create a faceted scatterplot with a continuous gradient legend, specifying facet layout, point character, and plot titles. ```r plt( Sepal.Length ~ Petal.Length | Sepal.Length, data = iris, facet = ~Species, pch = 19, main = "Faceted flowers", sub = "Brought to you by tinyplot" ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.