showcolor: Show a Color Palette

Description Usage Arguments Examples

View source: R/showcolor.R

Description

Simple function to show colors. NOTE: do not add coord_flip().

Usage

1
showcolor(x, label_size = 15, ...)

Arguments

x

a character vector of colors.

label_size

size of text on x-axis to show color names.

...

other arguments passed to geom_bar.

Examples

1
2
3
4
5
6
7
8
# A palette used by David Hockney
co=c("#833822", "#C03800", "#D3454C", 
	"#DC6A30", "#F29856", "#FEEF70", 
	"#A5D56D", "#16D670", "#00932F", 
	"#03592E", "#04B7B0", "#007BA9", 
	"#EC46BF", "#6A2C8F"
)
showcolor(co, label_size=10)

plothelper documentation built on July 2, 2020, 4:03 a.m.