% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scale_rextor.R
\name{scale_rextor}
\alias{scale_rextor}
\title{Coloring Scale for Data Visualization}
\usage{
scale_rextor(pal = "cute", direction = 1, aesthetic = "color", ...)
}
\arguments{
\item{pal}{Color palette. Use either numbers from 1 to X or one of the names: \code{'arby'}, \code{'cute'}...}

\item{direction}{Direction of the color palette. Keep blank or use 1 for the default direction or use -1 to reverse the colors.}

\item{aesthetic}{Which aesthetic to use the scale on; either \code{color} or \code{fill}, defaults to \code{color}.}

\item{...}{Other common scale parameters.}
}
\value{
\code{ggplot} plot object
}
\description{
This scale is very versatile and powerful. It offers several color palettes to choose from and automatically recognizes whether to use
a discrete or continuous scale depending on the data type of the mapping object.
It can also be used for both \code{color} and \code{fill} aesthetics by defining \code{aesthetic} accordingly directly inside the function!
}
\examples{
library(ggplot2)
ggplot(iris, aes(Species, Petal.Width, color = Petal.Width)) + 
geom_jitter() + 
theme_wob() + 
scale_rextor()

data <- data.frame(Time = rep(c("Time 1", "Time 2", "Time 3", "Time 4", 
                                "Time 5", "Time 6", "Time 7", "Time 8"), 
                                each = 2),
                                cont = 1:16,
                                Value = c(8, 5, 10, 3, 8, 5, 10, 3,  8, 5, 10, 3,  8, 5, 10, 3))

ggplot(data, aes(x = Time, y = Value, color = Time, fill = Time)) +
  geom_boxplot(alpha = 0.95) +
    theme_wob() +
    scale_rextor(pal = "neon") +
    scale_rextor(pal = "neon", aesthetic = "fill")
    
ggplot(data, aes(x = cont, y = Value, color = cont, fill = cont)) +
  geom_jitter(alpha = 0.8, size = 8) +
  theme_minimal() +
  scale_rextor(pal = "wextor") +
  scale_rextor(pal = "wextor", aesthetic = "fill")

}
