Learn R Programming

seecolor (version 0.2.0)

print_color: Print the colors

Description

Print out the colors used by a literal vector, a palette, or a ggplot object

Usage

print_color(x, type = "mosaic", blank.len = 3)

Arguments

x

A literal vector, a palette, or a ggplot object

type

A character. The style of printing. The default is mosaic. It should be one of the mosaic, ribbon, or m, r

blank.len

A integer. The length of color mosaic. The default value is 3.

Examples

Run this code

print_color(colors(), type = "mosaic", blank.len = 3)
print_color(palette(), type = "ribbon")

Run the code above in your browser using DataLab