plot_mnsl: Plot a munsell colour

Description Usage Arguments Value Examples

Description

Takes munsell text specifications and plots colour squares of them.

Usage

1
plot_mnsl(cols, back.col = "white", ...)

Arguments

cols

character vector specifying colours in Munsell form

back.col

specification of background colour of display

...

passed to check_mnsl. Add fix = TRUE to fix "bad" colours()

Value

A ggplot object

Examples

1
2
3
4
5
6
7
8
plot_mnsl("5R 5/6")
plot_mnsl("5R 5/6",  back.col = "grey40")
p <- plot_mnsl(c("5R 6/6", "5Y 6/6", "5G 6/6", "5B 6/6", "5P 6/6"),
 back.col = "grey40")
p
# returned object is a ggplot object so we can alter the layout
summary(p)
p + ggplot2::facet_wrap(~ num, nrow = 1)

Example output

data: num, names, hex, x, y, labels [5x6]
mapping:  x = ~x, y = ~y
scales:   x, xmin, xmax, xend, xintercept, xmin_final, xmax_final, xlower, xmiddle, xupper, y, ymin, ymax, yend, yintercept, ymin_final, ymax_final, lower, middle, upper, fill, colour 
faceting: <ggproto object: Class FacetWrap, Facet, gg>
    compute_layout: function
    draw_back: function
    draw_front: function
    draw_labels: function
    draw_panels: function
    finish_data: function
    init_scales: function
    map_data: function
    params: list
    setup_data: function
    setup_params: function
    shrink: TRUE
    train_scales: function
    vars: function
    super:  <ggproto object: Class FacetWrap, Facet, gg>
-----------------------------------
mapping: fill = ~hex 
geom_tile: na.rm = FALSE
stat_identity: na.rm = FALSE
position_identity 

mapping: label = ~labels, colour = ~text_colour(as.character(names)) 
geom_text: parse = FALSE, check_overlap = FALSE, na.rm = FALSE
stat_identity: na.rm = FALSE
position_identity 

munsell documentation built on May 2, 2019, 5:57 a.m.