scale_fill_kg {KaradaColor}R Documentation

Use Color fills on 'ggplot2'

Description

scale_fill_kg Use color palette on 'ggplot2' fills.

Usage

scale_fill_kg(
  name = "Sapporo_Sta",
  alpha = 1,
  na.value = "red",
  discrete = TRUE
)

Arguments

name

color palette name. (default: "Sapporo_Sta")

alpha

The alpha transparency. Numbers range from 0-1. see argument alpha in rgb.

na.value

Color of missing value.(default: "red")

discrete

Generate a discrete palette. (FALSE - generate continuous palette)

Value

Create a user defined color palette for 'ggplot2'.

Examples

set.seed(1)
x <- LETTERS[1:20]
y <- paste0("var", seq(1,20))
data <- expand.grid(X=x, Y=y)
data$Z <- sample(c(NA, rnorm(15)), 20, replace = TRUE)
library("ggplot2")
ggplot(data, aes(X, Y, fill= Z)) +
  geom_tile() +
  scale_fill_kg(discrete = FALSE, name = "Hanamushiro",
                alpha = 0.4, na.value = "red")

[Package KaradaColor version 0.1.5 Index]