view_palette: The view palette function

Description Usage Arguments Examples

View source: R/viewpalettes_function.R

Description

This function allows you to easily view beautiful palettes designed for maps.

Usage

1
view_palette(palette, n = 5, type = "bars")

Arguments

palette

The name of the palette. One of "green_machine", "irish_flag", "tealberry_pie", "sunset", "the_joker" or "bruiser" or a vector of 5 hex codes.

n

The number of colors in the palette, Defaults to 5. Set to length(palette) if hex codes provided as 'palette'.

type

Either "bars" which shows palette as bars, "raster" which shows elevation in Swaziland or "polys" which shows mean elevation in Swaziland by admin 2 area.

Examples

1
2
3
4
5
view_palette("bruiser")

# Use custom set of hexcodes
view_palette(c("#1D3141","#096168","#209478","#75C56E","#E2EE5E"),
type="raster")

disarm-platform/MapPalettes documentation built on Jan. 11, 2020, 5:51 p.m.