Quickly generate a preview of a ggprism theme. See names(ggprism_data$themes) for valid palette names.

preview_theme(palette)

Arguments

palette

string. Palette name.

Value

Returns an object of class ggplot.

Examples

library(ggplot2)

## see names of available themes
names(ggprism_data$themes)
#>  [1] "autumn_leaves"   "beer_and_ales"   "black_and_white" "candy_bright"   
#>  [5] "candy_soft"      "colorblind_safe" "colors"          "diazo"          
#>  [9] "earth_tones"     "evergreen"       "greenwash"       "muted_rainbow"  
#> [13] "office"          "purple_passion"  "shades_of_gray"  "summer"         
#> [17] "the_blues"       "winter_soft"     "stained_glass"   "warm_pastels"   
#> [21] "flames"          "floral"          "inferno"         "magma"          
#> [25] "mustard_field"   "neon"            "pastels"         "pearl"          
#> [29] "plasma"          "prism_dark"      "prism_light"     "quiet"          
#> [33] "spring"          "starry"          "viridis"         "waves"          
#> [37] "blueprint"       "fir"             "ocean"           "sunny_garden"   
#> [41] "wool_muffler"    "warm_and_sunny"  "winter_bright"   "all_null"       

## preview a theme
preview_theme("floral")