Skip to contents

This function generates a visual preview of a DOYPAColors palette with multiple plots. It includes a direct palette preview, a scatter plot, a bar plot, and a heatmap, each using the specified palette.

Usage

preview_pal(palette, seed = NULL)

Arguments

palette

A character string specifying the name of the palette to use.

seed

An optional seed for reproducibility of random numbers.

Value

A `ggplot` object with multiple plots arranged in a grid, showcasing the color palette in different visualizations.

Examples

# Preview a DOYPAColors palette with multiple plots
preview_pal(palette = "buzz")
#> Warning: Computation failed in `stat_binhex()`.
#> Caused by error in `compute_group()`:
#> ! The package "hexbin" is required for `stat_bin_hex()`.