ggsci/ 0000755 0001762 0000144 00000000000 14570544004 011351 5 ustar ligges users ggsci/NAMESPACE 0000644 0001762 0000144 00000004560 14570505642 012602 0 ustar ligges users # Generated by roxygen2: do not edit by hand
export(pal_aaas)
export(pal_cosmic)
export(pal_d3)
export(pal_flatui)
export(pal_frontiers)
export(pal_futurama)
export(pal_gsea)
export(pal_igv)
export(pal_jama)
export(pal_jco)
export(pal_lancet)
export(pal_locuszoom)
export(pal_material)
export(pal_nejm)
export(pal_npg)
export(pal_rickandmorty)
export(pal_simpsons)
export(pal_startrek)
export(pal_tron)
export(pal_uchicago)
export(pal_ucscgb)
export(rgb_gsea)
export(rgb_material)
export(scale_color_aaas)
export(scale_color_cosmic)
export(scale_color_d3)
export(scale_color_flatui)
export(scale_color_frontiers)
export(scale_color_futurama)
export(scale_color_gsea)
export(scale_color_igv)
export(scale_color_jama)
export(scale_color_jco)
export(scale_color_lancet)
export(scale_color_locuszoom)
export(scale_color_material)
export(scale_color_nejm)
export(scale_color_npg)
export(scale_color_rickandmorty)
export(scale_color_simpsons)
export(scale_color_startrek)
export(scale_color_tron)
export(scale_color_uchicago)
export(scale_color_ucscgb)
export(scale_colour_aaas)
export(scale_colour_cosmic)
export(scale_colour_d3)
export(scale_colour_flatui)
export(scale_colour_frontiers)
export(scale_colour_futurama)
export(scale_colour_gsea)
export(scale_colour_igv)
export(scale_colour_jama)
export(scale_colour_jco)
export(scale_colour_lancet)
export(scale_colour_locuszoom)
export(scale_colour_material)
export(scale_colour_nejm)
export(scale_colour_npg)
export(scale_colour_rickandmorty)
export(scale_colour_simpsons)
export(scale_colour_startrek)
export(scale_colour_tron)
export(scale_colour_uchicago)
export(scale_colour_ucscgb)
export(scale_fill_aaas)
export(scale_fill_cosmic)
export(scale_fill_d3)
export(scale_fill_flatui)
export(scale_fill_frontiers)
export(scale_fill_futurama)
export(scale_fill_gsea)
export(scale_fill_igv)
export(scale_fill_jama)
export(scale_fill_jco)
export(scale_fill_lancet)
export(scale_fill_locuszoom)
export(scale_fill_material)
export(scale_fill_nejm)
export(scale_fill_npg)
export(scale_fill_rickandmorty)
export(scale_fill_simpsons)
export(scale_fill_startrek)
export(scale_fill_tron)
export(scale_fill_uchicago)
export(scale_fill_ucscgb)
importFrom(ggplot2,discrete_scale)
importFrom(ggplot2,scale_color_gradientn)
importFrom(ggplot2,scale_fill_gradientn)
importFrom(grDevices,col2rgb)
importFrom(grDevices,colorRamp)
importFrom(grDevices,rgb)
importFrom(scales,manual_pal)
ggsci/README.md 0000644 0001762 0000144 00000007756 14570505642 012654 0 ustar ligges users
# ggsci
[](https://github.com/nanxstats/ggsci/actions/workflows/R-CMD-check.yaml)
[](https://cran.r-project.org/package=ggsci)
[](https://cran.r-project.org/package=ggsci)
`ggsci` offers a collection of `ggplot2` color palettes inspired by
scientific journals, data visualization libraries, science fiction
movies, and TV shows.
## Installation
You can install `ggsci` from CRAN:
``` r
install.packages("ggsci")
```
Or try the development version on GitHub:
``` r
remotes::install_github("nanxstats/ggsci")
```
[Browse the vignette](https://nanx.me/ggsci/articles/ggsci.html) (or
open with `vignette("ggsci")` in R) for a quick-start guide.
## Gallery
### NPG
### AAAS
### NEJM
### Lancet
### JAMA
### JCO
### UCSCGB
### D3
### LocusZoom
### IGV
### COSMIC


### UChicago
### Star Trek
### Tron Legacy
### Futurama
### Rick and Morty
### The Simpsons
### Flat UI
### Frontiers
### GSEA
### Material Design
## Contribute
To contribute to this project, please take a look at the [Contributing
Guidelines](https://nanx.me/ggsci/CONTRIBUTING.html) first. Please note
that the ggsci project is released with a [Contributor Code of
Conduct](https://nanx.me/ggsci/CODE_OF_CONDUCT.html). By contributing to
this project, you agree to abide by its terms.
ggsci/man/ 0000755 0001762 0000144 00000000000 14570505642 012131 5 ustar ligges users ggsci/man/scale_npg.Rd 0000644 0001762 0000144 00000002515 14570505642 014356 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-npg.R
\name{scale_color_npg}
\alias{scale_color_npg}
\alias{scale_colour_npg}
\alias{scale_fill_npg}
\title{NPG Journal Color Scales}
\usage{
scale_color_npg(palette = c("nrc"), alpha = 1, ...)
scale_colour_npg(palette = c("nrc"), alpha = 1, ...)
scale_fill_npg(palette = c("nrc"), alpha = 1, ...)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"nrc"}
(10-color palette inspired by \emph{Nature Reviews Cancer}).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{...}{additional parameters for \code{\link[ggplot2]{discrete_scale}}}
}
\description{
See \code{\link{pal_npg}} for details.
}
\examples{
library("ggplot2")
data("diamonds")
ggplot(
subset(diamonds, carat >= 2.2),
aes(x = table, y = price, colour = cut)
) +
geom_point(alpha = 0.7) +
geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) +
theme_bw() + scale_color_npg()
ggplot(
subset(diamonds, carat > 2.2 & depth > 55 & depth < 70),
aes(x = depth, fill = cut)
) +
geom_histogram(colour = "black", binwidth = 1, position = "dodge") +
theme_bw() + scale_fill_npg()
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/scale_jama.Rd 0000644 0001762 0000144 00000002536 14570505642 014505 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-jama.R
\name{scale_color_jama}
\alias{scale_color_jama}
\alias{scale_colour_jama}
\alias{scale_fill_jama}
\title{Journal of the American Medical Association Color Scales}
\usage{
scale_color_jama(palette = c("default"), alpha = 1, ...)
scale_colour_jama(palette = c("default"), alpha = 1, ...)
scale_fill_jama(palette = c("default"), alpha = 1, ...)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"default"}
(7-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{...}{additional parameters for \code{\link[ggplot2]{discrete_scale}}}
}
\description{
See \code{\link{pal_jama}} for details.
}
\examples{
library("ggplot2")
data("diamonds")
ggplot(
subset(diamonds, carat >= 2.2),
aes(x = table, y = price, colour = cut)
) +
geom_point(alpha = 0.7) +
geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) +
theme_bw() + scale_color_jama()
ggplot(
subset(diamonds, carat > 2.2 & depth > 55 & depth < 70),
aes(x = depth, fill = cut)
) +
geom_histogram(colour = "black", binwidth = 1, position = "dodge") +
theme_bw() + scale_fill_jama()
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/scale_material.Rd 0000644 0001762 0000144 00000004552 14570505642 015373 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/continuous-material.R
\name{scale_color_material}
\alias{scale_color_material}
\alias{scale_colour_material}
\alias{scale_fill_material}
\title{Material Design Color Palettes}
\usage{
scale_color_material(
palette = c("red", "pink", "purple", "deep-purple", "indigo", "blue", "light-blue",
"cyan", "teal", "green", "light-green", "lime", "yellow", "amber", "orange",
"deep-orange", "brown", "grey", "blue-grey"),
alpha = 1,
reverse = FALSE,
...
)
scale_colour_material(
palette = c("red", "pink", "purple", "deep-purple", "indigo", "blue", "light-blue",
"cyan", "teal", "green", "light-green", "lime", "yellow", "amber", "orange",
"deep-orange", "brown", "grey", "blue-grey"),
alpha = 1,
reverse = FALSE,
...
)
scale_fill_material(
palette = c("red", "pink", "purple", "deep-purple", "indigo", "blue", "light-blue",
"cyan", "teal", "green", "light-green", "lime", "yellow", "amber", "orange",
"deep-orange", "brown", "grey", "blue-grey"),
alpha = 1,
reverse = FALSE,
...
)
}
\arguments{
\item{palette}{Palette type.
There are 19 available options:
\itemize{
\item \code{"red"}
\item \code{"pink"}
\item \code{"purple"}
\item \code{"deep-purple"}
\item \code{"indigo"}
\item \code{"blue"}
\item \code{"light-blue"}
\item \code{"cyan"}
\item \code{"teal"}
\item \code{"green"}
\item \code{"light-green"}
\item \code{"lime"}
\item \code{"yellow"}
\item \code{"amber"}
\item \code{"orange"},
\item \code{"deep-orange"}
\item \code{"brown"}
\item \code{"grey"}
\item \code{"blue-grey"}}
See \href{https://m2.material.io/design/color/the-color-system.html}{Material Design color system}
for details.}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{reverse}{Logical. Should the order of the colors be reversed?}
\item{...}{additional parameters for \code{\link[ggplot2]{discrete_scale}}}
}
\description{
See \code{\link{pal_material}} for details.
}
\examples{
library("ggplot2")
library("reshape2")
data("mtcars")
cor <- abs(cor(mtcars))
cor_melt <- melt(cor)
ggplot(
cor_melt,
aes(x = Var1, y = Var2, fill = value)
) +
geom_tile(colour = "black", size = 0.3) +
theme_bw() + scale_fill_material("blue-grey")
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/pal_igv.Rd 0000644 0001762 0000144 00000001767 14570517442 014055 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-igv.R
\name{pal_igv}
\alias{pal_igv}
\title{Integrative Genomics Viewer (IGV) Color Palettes}
\usage{
pal_igv(palette = c("default", "alternating"), alpha = 1)
}
\arguments{
\item{palette}{Palette type.
There are two available options:
\code{"default"} (51-color palette);
\code{"alternating"} (2-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
}
\description{
Color palettes based on the colors used by
Integrative Genomics Viewer (IGV).
}
\examples{
library("scales")
show_col(pal_igv("default")(51))
show_col(pal_igv("alternating")(2))
}
\references{
James T. Robinson, Helga Thorvaldsdóttir, Wendy Winckler,
Mitchell Guttman, Eric S. Lander, Gad Getz, Jill P. Mesirov.
Integrative Genomics Viewer. \emph{Nature Biotechnology} 29, 24--26 (2011).
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/pal_cosmic.Rd 0000644 0001762 0000144 00000002560 14570505642 014534 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-cosmic.R
\name{pal_cosmic}
\alias{pal_cosmic}
\title{COSMIC Color Palettes}
\usage{
pal_cosmic(
palette = c("hallmarks_light", "hallmarks_dark", "signature_substitutions"),
alpha = 1
)
}
\arguments{
\item{palette}{Palette type. Currently there are three available options:
\code{"signature_substitutions"} (6-color palette),
\code{"hallmarks_light"} (10-color palette), and \code{"hallmarks_dark"}
(10-color palette). The \code{"hallmarks_light"} option is from
\href{https://pubmed.ncbi.nlm.nih.gov/21376230/}{Hanahan and Weinberg (2011)}.}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
}
\description{
Color palettes inspired by the colors used in projects from the
\href{https://cancer.sanger.ac.uk/cosmic}{Catalogue Of
Somatic Mutations in Cancers (COSMIC)}
}
\examples{
library("scales")
show_col(pal_cosmic("hallmarks_light")(10))
show_col(pal_cosmic("hallmarks_light", alpha = 0.6)(10))
show_col(pal_cosmic("hallmarks_dark")(10))
show_col(pal_cosmic("hallmarks_dark", alpha = 0.6)(10))
show_col(pal_cosmic("signature_substitutions")(6))
show_col(pal_cosmic("signature_substitutions", alpha = 0.6)(6))
}
\author{
Joshua H. Cook <\email{joshuacook0023@gmail.com}> |
<\href{https://github.com/jhrcook}{GitHub/jhrcook}>
}
ggsci/man/pal_aaas.Rd 0000644 0001762 0000144 00000001565 14570505642 014170 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-aaas.R
\name{pal_aaas}
\alias{pal_aaas}
\title{AAAS Journal Color Palettes}
\usage{
pal_aaas(palette = c("default"), alpha = 1)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"default"}
(10-color palette inspired by \emph{Science}).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
}
\description{
Color palettes inspired by plots in journals published by
American Association for the Advancement of Science (AAAS),
such as \emph{Science} and \emph{Science Translational Medicine}.
}
\examples{
library("scales")
show_col(pal_aaas("default")(10))
show_col(pal_aaas("default", alpha = 0.6)(10))
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/rgb_gsea.Rd 0000644 0001762 0000144 00000002352 14570505642 014173 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/continuous-gsea.R
\name{rgb_gsea}
\alias{rgb_gsea}
\title{The GSEA GenePattern Color Palettes}
\usage{
rgb_gsea(palette = c("default"), n = 12, alpha = 1, reverse = FALSE)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"default"}
(continuous palette with 12 base colors).}
\item{n}{Number of individual colors to be generated.}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{reverse}{Logical. Should the order of the colors be reversed?}
}
\description{
Color palette inspired by the colors used in the
heatmaps plotted by GSEA GenePattern.
}
\note{
The 12 base colors used in this palette are derived from the
\href{https://modulerepository.genepattern.org/gpModuleRepository/download/prod/module/?file=/HeatMapImage/broad.mit.edu:cancer.software.genepattern.module.analysis/00032/6/HeatMapImage.pdf}{HeatMapImage documentation}.
}
\examples{
library("scales")
show_col(pal_gsea("default")(12))
show_col(pal_gsea("default", n = 30, alpha = 0.6, reverse = TRUE)(30))
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/pal_material.Rd 0000644 0001762 0000144 00000003115 14570505642 015052 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/continuous-material.R
\name{pal_material}
\alias{pal_material}
\title{Material Design Color Palettes}
\usage{
pal_material(
palette = c("red", "pink", "purple", "deep-purple", "indigo", "blue", "light-blue",
"cyan", "teal", "green", "light-green", "lime", "yellow", "amber", "orange",
"deep-orange", "brown", "grey", "blue-grey"),
n = 10,
alpha = 1,
reverse = FALSE
)
}
\arguments{
\item{palette}{Palette type.
There are 19 available options:
\itemize{
\item \code{"red"}
\item \code{"pink"}
\item \code{"purple"}
\item \code{"deep-purple"}
\item \code{"indigo"}
\item \code{"blue"}
\item \code{"light-blue"}
\item \code{"cyan"}
\item \code{"teal"}
\item \code{"green"}
\item \code{"light-green"}
\item \code{"lime"}
\item \code{"yellow"}
\item \code{"amber"}
\item \code{"orange"},
\item \code{"deep-orange"}
\item \code{"brown"}
\item \code{"grey"}
\item \code{"blue-grey"}}
See \href{https://m2.material.io/design/color/the-color-system.html}{Material Design color system}
for details.}
\item{n}{Number of individual colors to be generated.}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{reverse}{Logical. Should the order of the colors be reversed?}
}
\description{
The Material Design color palettes.
}
\examples{
library("scales")
show_col(pal_material("indigo")(10))
show_col(pal_material("indigo", n = 30, alpha = 0.6, reverse = TRUE)(30))
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/pal_frontiers.Rd 0000644 0001762 0000144 00000001326 14570505642 015271 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-frontiers.R
\name{pal_frontiers}
\alias{pal_frontiers}
\title{Frontiers Color Palettes}
\usage{
pal_frontiers(palette = c("default"), alpha = 1)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"default"}
(10-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
}
\description{
Color palettes inspired by the colors used in \emph{Frontiers}.
}
\examples{
library("scales")
show_col(pal_frontiers("default")(7))
show_col(pal_frontiers("default", alpha = 0.6)(7))
}
\author{
Clara Jégousse <\email{cat3@hi.is}>
}
ggsci/man/pal_rickandmorty.Rd 0000644 0001762 0000144 00000001435 14570505642 015765 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-rickandmorty.R
\name{pal_rickandmorty}
\alias{pal_rickandmorty}
\title{Rick and Morty Color Palettes}
\usage{
pal_rickandmorty(palette = c("schwifty"), alpha = 1)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"schwifty"}
(12-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
}
\description{
Color palettes inspired by the colors used in \emph{Rick and Morty}.
}
\examples{
library("scales")
show_col(pal_rickandmorty("schwifty")(12))
show_col(pal_rickandmorty("schwifty", alpha = 0.6)(12))
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/pal_uchicago.Rd 0000644 0001762 0000144 00000001743 14570505642 015043 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-uchicago.R
\name{pal_uchicago}
\alias{pal_uchicago}
\title{The University of Chicago Color Palettes}
\usage{
pal_uchicago(palette = c("default", "light", "dark"), alpha = 1)
}
\arguments{
\item{palette}{Palette type.
There are 3 available options:
\code{"default"} (9-color palette);
\code{"light"} (9-color light palette);
\code{"dark"} (9-color dark palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
}
\description{
Color palettes based on the colors used by the University of Chicago.
}
\examples{
library("scales")
show_col(pal_uchicago("default")(9))
show_col(pal_uchicago("light")(9))
show_col(pal_uchicago("dark")(9))
}
\references{
\url{https://news.uchicago.edu/sites/default/files/attachments/_uchicago.identity.guidelines.pdf}
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/scale_uchicago.Rd 0000644 0001762 0000144 00000003445 14570505642 015357 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-uchicago.R
\name{scale_color_uchicago}
\alias{scale_color_uchicago}
\alias{scale_colour_uchicago}
\alias{scale_fill_uchicago}
\title{The University of Chicago Color Scales}
\usage{
scale_color_uchicago(palette = c("default", "light", "dark"), alpha = 1, ...)
scale_colour_uchicago(palette = c("default", "light", "dark"), alpha = 1, ...)
scale_fill_uchicago(palette = c("default", "light", "dark"), alpha = 1, ...)
}
\arguments{
\item{palette}{Palette type.
There are 3 available options:
\code{"default"} (9-color palette);
\code{"light"} (9-color light palette);
\code{"dark"} (9-color dark palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{...}{additional parameters for \code{\link[ggplot2]{discrete_scale}}}
}
\description{
See \code{\link{pal_uchicago}} for details.
}
\examples{
library("ggplot2")
data("diamonds")
p1 <- ggplot(
subset(diamonds, carat >= 2.2),
aes(x = table, y = price, colour = cut)
) +
geom_point(alpha = 0.7) +
geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) +
theme_bw()
p2 <- ggplot(
subset(diamonds, carat > 2.2 & depth > 55 & depth < 70),
aes(x = depth, fill = cut)
) +
geom_histogram(colour = "black", binwidth = 1, position = "dodge") +
theme_bw()
p1 + scale_color_uchicago()
p2 + scale_fill_uchicago()
p1 + scale_color_uchicago(palette = "light")
p2 + scale_fill_uchicago(palette = "light")
p1 + scale_color_uchicago(palette = "dark")
p2 + scale_fill_uchicago(palette = "dark")
}
\references{
\url{https://news.uchicago.edu/sites/default/files/attachments/_uchicago.identity.guidelines.pdf}
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/scale_simpsons.Rd 0000644 0001762 0000144 00000002574 14570505642 015452 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-simpsons.R
\name{scale_color_simpsons}
\alias{scale_color_simpsons}
\alias{scale_colour_simpsons}
\alias{scale_fill_simpsons}
\title{The Simpsons Color Scales}
\usage{
scale_color_simpsons(palette = c("springfield"), alpha = 1, ...)
scale_colour_simpsons(palette = c("springfield"), alpha = 1, ...)
scale_fill_simpsons(palette = c("springfield"), alpha = 1, ...)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"springfield"}
(16-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{...}{additional parameters for \code{\link[ggplot2]{discrete_scale}}}
}
\description{
See \code{\link{pal_simpsons}} for details.
}
\examples{
library("ggplot2")
data("diamonds")
ggplot(
subset(diamonds, carat >= 2.2),
aes(x = table, y = price, colour = cut)
) +
geom_point(alpha = 0.7) +
geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) +
theme_bw() + scale_color_simpsons()
ggplot(
subset(diamonds, carat > 2.2 & depth > 55 & depth < 70),
aes(x = depth, fill = cut)
) +
geom_histogram(colour = "black", binwidth = 1, position = "dodge") +
theme_bw() + scale_fill_simpsons()
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/scale_cosmic.Rd 0000644 0001762 0000144 00000003420 14570505642 015043 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-cosmic.R
\name{scale_color_cosmic}
\alias{scale_color_cosmic}
\alias{scale_colour_cosmic}
\alias{scale_fill_cosmic}
\title{COSMIC Color Scales}
\usage{
scale_color_cosmic(
palette = c("hallmarks_light", "hallmarks_dark", "signature_substitutions"),
alpha = 1,
...
)
scale_colour_cosmic(
palette = c("hallmarks_light", "hallmarks_dark", "signature_substitutions"),
alpha = 1,
...
)
scale_fill_cosmic(
palette = c("hallmarks_light", "hallmarks_dark", "signature_substitutions"),
alpha = 1,
...
)
}
\arguments{
\item{palette}{Palette type. Currently there are three available options:
\code{"signature_substitutions"} (6-color palette),
\code{"hallmarks_light"} (10-color palette), and \code{"hallmarks_dark"}
(10-color palette). The \code{"hallmarks_light"} option is from
\href{https://pubmed.ncbi.nlm.nih.gov/21376230/}{Hanahan and Weinberg (2011)}.}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{...}{additional parameters for \code{\link[ggplot2]{discrete_scale}}}
}
\description{
See \code{\link{pal_cosmic}} for details.
}
\examples{
library("ggplot2")
data("diamonds")
ggplot(
subset(diamonds, carat >= 2.2),
aes(x = table, y = price, colour = cut)
) +
geom_point(alpha = 0.7) +
geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) +
theme_bw() + scale_color_cosmic()
ggplot(
subset(diamonds, carat > 2.2 & depth > 55 & depth < 70),
aes(x = depth, fill = cut)
) +
geom_histogram(colour = "black", binwidth = 1, position = "dodge") +
theme_bw() + scale_fill_cosmic()
}
\author{
Joshua H. Cook <\email{joshuacook0023@gmail.com}> |
<\href{https://github.com/jhrcook}{GitHub/jhrcook}>
}
ggsci/man/scale_rickandmorty.Rd 0000644 0001762 0000144 00000002636 14570505642 016304 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-rickandmorty.R
\name{scale_color_rickandmorty}
\alias{scale_color_rickandmorty}
\alias{scale_colour_rickandmorty}
\alias{scale_fill_rickandmorty}
\title{Rick and Morty Color Scales}
\usage{
scale_color_rickandmorty(palette = c("schwifty"), alpha = 1, ...)
scale_colour_rickandmorty(palette = c("schwifty"), alpha = 1, ...)
scale_fill_rickandmorty(palette = c("schwifty"), alpha = 1, ...)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"schwifty"}
(12-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{...}{additional parameters for \code{\link[ggplot2]{discrete_scale}}}
}
\description{
See \code{\link{pal_rickandmorty}} for details.
}
\examples{
library("ggplot2")
data("diamonds")
ggplot(
subset(diamonds, carat >= 2.2),
aes(x = table, y = price, colour = cut)
) +
geom_point(alpha = 0.7) +
geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) +
theme_bw() + scale_color_rickandmorty()
ggplot(
subset(diamonds, carat > 2.2 & depth > 55 & depth < 70),
aes(x = depth, fill = cut)
) +
geom_histogram(colour = "black", binwidth = 1, position = "dodge") +
theme_bw() + scale_fill_rickandmorty()
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/ggsci-package.Rd 0000644 0001762 0000144 00000002031 14570505642 015101 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggsci-package.R
\docType{package}
\name{ggsci-package}
\alias{ggsci}
\alias{ggsci-package}
\title{ggsci: Scientific Journal and Sci-Fi Themed Color Palettes for 'ggplot2'}
\description{
\if{html}{\figure{logo.png}{options: style='float: right' alt='logo' width='120'}}
A collection of 'ggplot2' color palettes inspired by plots in scientific journals, data visualization libraries, science fiction movies, and TV shows.
}
\seealso{
Useful links:
\itemize{
\item \url{https://nanx.me/ggsci/}
\item \url{https://github.com/nanxstats/ggsci}
\item Report bugs at \url{https://github.com/nanxstats/ggsci/issues}
}
}
\author{
\strong{Maintainer}: Nan Xiao \email{me@nanx.me} (\href{https://orcid.org/0000-0002-0250-5673}{ORCID})
Other contributors:
\itemize{
\item Joshua Cook \email{joshuacook0023@gmail.com} [contributor]
\item Clara Jégousse \email{cat3@hi.is} [contributor]
\item Miaozhu Li \email{miaozhu.li@duke.edu} [contributor]
}
}
\keyword{internal}
ggsci/man/pal_tron.Rd 0000644 0001762 0000144 00000001334 14570505642 014237 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-tron.R
\name{pal_tron}
\alias{pal_tron}
\title{Tron Legacy Color Palettes}
\usage{
pal_tron(palette = c("legacy"), alpha = 1)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"legacy"}
(7-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
}
\description{
Color palettes inspired by the colors used in \emph{Tron Legacy}.
}
\examples{
library("scales")
show_col(pal_tron("legacy")(7))
show_col(pal_tron("legacy", alpha = 0.6)(7))
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/scale_igv.Rd 0000644 0001762 0000144 00000003113 14570505642 014352 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-igv.R
\name{scale_color_igv}
\alias{scale_color_igv}
\alias{scale_colour_igv}
\alias{scale_fill_igv}
\title{Integrative Genomics Viewer (IGV) Color Scales}
\usage{
scale_color_igv(palette = c("default", "alternating"), alpha = 1, ...)
scale_colour_igv(palette = c("default", "alternating"), alpha = 1, ...)
scale_fill_igv(palette = c("default", "alternating"), alpha = 1, ...)
}
\arguments{
\item{palette}{Palette type.
There are two available options:
\code{"default"} (51-color palette);
\code{"alternating"} (2-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{...}{additional parameters for \code{\link[ggplot2]{discrete_scale}}}
}
\description{
See \code{\link{pal_igv}} for details.
}
\examples{
library("ggplot2")
data("diamonds")
p1 <- ggplot(
subset(diamonds, carat >= 2.2),
aes(x = table, y = price, colour = cut)
) +
geom_point(alpha = 0.7) +
geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) +
theme_bw()
p2 <- ggplot(
subset(diamonds, carat > 2.2 & depth > 55 & depth < 70),
aes(x = depth, fill = cut)
) +
geom_histogram(colour = "black", binwidth = 1, position = "dodge") +
theme_bw()
p1 + scale_color_igv()
p2 + scale_fill_igv()
p1 + scale_colour_manual(
values = rep(pal_igv("alternating")(2), times = 3)
)
p2 + scale_fill_manual(
values = rep(pal_igv("alternating")(2), times = 3)
)
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/scale_locuszoom.Rd 0000644 0001762 0000144 00000002563 14570505642 015627 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-locuszoom.R
\name{scale_color_locuszoom}
\alias{scale_color_locuszoom}
\alias{scale_colour_locuszoom}
\alias{scale_fill_locuszoom}
\title{LocusZoom Color Scales}
\usage{
scale_color_locuszoom(palette = c("default"), alpha = 1, ...)
scale_colour_locuszoom(palette = c("default"), alpha = 1, ...)
scale_fill_locuszoom(palette = c("default"), alpha = 1, ...)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"default"}
(7-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{...}{additional parameters for \code{\link[ggplot2]{discrete_scale}}}
}
\description{
See \code{\link{pal_locuszoom}} for details.
}
\examples{
library("ggplot2")
data("diamonds")
ggplot(
subset(diamonds, carat >= 2.2),
aes(x = table, y = price, colour = cut)
) +
geom_point(alpha = 0.7) +
geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) +
theme_bw() + scale_color_locuszoom()
ggplot(
subset(diamonds, carat > 2.2 & depth > 55 & depth < 70),
aes(x = depth, fill = cut)
) +
geom_histogram(colour = "black", binwidth = 1, position = "dodge") +
theme_bw() + scale_fill_locuszoom()
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/scale_nejm.Rd 0000644 0001762 0000144 00000002467 14570505642 014531 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-nejm.R
\name{scale_color_nejm}
\alias{scale_color_nejm}
\alias{scale_colour_nejm}
\alias{scale_fill_nejm}
\title{NEJM Color Scales}
\usage{
scale_color_nejm(palette = c("default"), alpha = 1, ...)
scale_colour_nejm(palette = c("default"), alpha = 1, ...)
scale_fill_nejm(palette = c("default"), alpha = 1, ...)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"default"}
(8-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{...}{additional parameters for \code{\link[ggplot2]{discrete_scale}}}
}
\description{
See \code{\link{pal_nejm}} for details.
}
\examples{
library("ggplot2")
data("diamonds")
ggplot(
subset(diamonds, carat >= 2.2),
aes(x = table, y = price, colour = cut)
) +
geom_point(alpha = 0.7) +
geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) +
theme_bw() + scale_color_nejm()
ggplot(
subset(diamonds, carat > 2.2 & depth > 55 & depth < 70),
aes(x = depth, fill = cut)
) +
geom_histogram(colour = "black", binwidth = 1, position = "dodge") +
theme_bw() + scale_fill_nejm()
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/scale_aaas.Rd 0000644 0001762 0000144 00000002533 14570505642 014477 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-aaas.R
\name{scale_color_aaas}
\alias{scale_color_aaas}
\alias{scale_colour_aaas}
\alias{scale_fill_aaas}
\title{AAAS Journal Color Scales}
\usage{
scale_color_aaas(palette = c("default"), alpha = 1, ...)
scale_colour_aaas(palette = c("default"), alpha = 1, ...)
scale_fill_aaas(palette = c("default"), alpha = 1, ...)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"default"}
(10-color palette inspired by \emph{Science}).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{...}{additional parameters for \code{\link[ggplot2]{discrete_scale}}}
}
\description{
See \code{\link{pal_aaas}} for details.
}
\examples{
library("ggplot2")
data("diamonds")
ggplot(
subset(diamonds, carat >= 2.2),
aes(x = table, y = price, colour = cut)
) +
geom_point(alpha = 0.7) +
geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) +
theme_bw() + scale_color_aaas()
ggplot(
subset(diamonds, carat > 2.2 & depth > 55 & depth < 70),
aes(x = depth, fill = cut)
) +
geom_histogram(colour = "black", binwidth = 1, position = "dodge") +
theme_bw() + scale_fill_aaas()
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/scale_startrek.Rd 0000644 0001762 0000144 00000002550 14570505642 015430 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-startrek.R
\name{scale_color_startrek}
\alias{scale_color_startrek}
\alias{scale_colour_startrek}
\alias{scale_fill_startrek}
\title{Star Trek Color Scales}
\usage{
scale_color_startrek(palette = c("uniform"), alpha = 1, ...)
scale_colour_startrek(palette = c("uniform"), alpha = 1, ...)
scale_fill_startrek(palette = c("uniform"), alpha = 1, ...)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"uniform"}
(7-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{...}{additional parameters for \code{\link[ggplot2]{discrete_scale}}}
}
\description{
See \code{\link{pal_startrek}} for details.
}
\examples{
library("ggplot2")
data("diamonds")
ggplot(
subset(diamonds, carat >= 2.2),
aes(x = table, y = price, colour = cut)
) +
geom_point(alpha = 0.7) +
geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) +
theme_bw() + scale_color_startrek()
ggplot(
subset(diamonds, carat > 2.2 & depth > 55 & depth < 70),
aes(x = depth, fill = cut)
) +
geom_histogram(colour = "black", binwidth = 1, position = "dodge") +
theme_bw() + scale_fill_startrek()
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/rgb_material.Rd 0000644 0001762 0000144 00000003234 14570505642 015052 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/continuous-material.R
\name{rgb_material}
\alias{rgb_material}
\title{Material Design Color Palettes}
\usage{
rgb_material(
palette = c("red", "pink", "purple", "deep-purple", "indigo", "blue", "light-blue",
"cyan", "teal", "green", "light-green", "lime", "yellow", "amber", "orange",
"deep-orange", "brown", "grey", "blue-grey"),
n = 10,
alpha = 1,
reverse = FALSE
)
}
\arguments{
\item{palette}{Palette type.
There are 19 available options:
\itemize{
\item \code{"red"}
\item \code{"pink"}
\item \code{"purple"}
\item \code{"deep-purple"}
\item \code{"indigo"}
\item \code{"blue"}
\item \code{"light-blue"}
\item \code{"cyan"}
\item \code{"teal"}
\item \code{"green"}
\item \code{"light-green"}
\item \code{"lime"}
\item \code{"yellow"}
\item \code{"amber"}
\item \code{"orange"},
\item \code{"deep-orange"}
\item \code{"brown"}
\item \code{"grey"}
\item \code{"blue-grey"}}
See \href{https://m2.material.io/design/color/the-color-system.html}{Material Design color system}
for details.}
\item{n}{Number of individual colors to be generated.}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{reverse}{Logical. Should the order of the colors be reversed?}
}
\description{
The Material Design color palettes.
}
\examples{
library("scales")
show_col(pal_material("indigo")(10))
show_col(pal_material("indigo", n = 30, alpha = 0.6, reverse = TRUE)(30))
}
\references{
\url{https://m2.material.io/design/color/the-color-system.html}
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/scale_ucscgb.Rd 0000644 0001762 0000144 00000002535 14570505642 015042 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-ucscgb.R
\name{scale_color_ucscgb}
\alias{scale_color_ucscgb}
\alias{scale_colour_ucscgb}
\alias{scale_fill_ucscgb}
\title{UCSC Genome Browser Color Scales}
\usage{
scale_color_ucscgb(palette = c("default"), alpha = 1, ...)
scale_colour_ucscgb(palette = c("default"), alpha = 1, ...)
scale_fill_ucscgb(palette = c("default"), alpha = 1, ...)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"default"}
(26-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{...}{additional parameters for \code{\link[ggplot2]{discrete_scale}}}
}
\description{
See \code{\link{pal_ucscgb}} for details.
}
\examples{
library("ggplot2")
data("diamonds")
ggplot(
subset(diamonds, carat >= 2.2),
aes(x = table, y = price, colour = cut)
) +
geom_point(alpha = 0.7) +
geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) +
theme_bw() + scale_color_ucscgb()
ggplot(
subset(diamonds, carat > 2.2 & depth > 55 & depth < 70),
aes(x = depth, fill = cut)
) +
geom_histogram(colour = "black", binwidth = 1, position = "dodge") +
theme_bw() + scale_fill_ucscgb()
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/scale_lancet.Rd 0000644 0001762 0000144 00000002566 14570505642 015046 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-lancet.R
\name{scale_color_lancet}
\alias{scale_color_lancet}
\alias{scale_colour_lancet}
\alias{scale_fill_lancet}
\title{Lancet Journal Color Scales}
\usage{
scale_color_lancet(palette = c("lanonc"), alpha = 1, ...)
scale_colour_lancet(palette = c("lanonc"), alpha = 1, ...)
scale_fill_lancet(palette = c("lanonc"), alpha = 1, ...)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"lanonc"}
(9-color palette inspired by \emph{Lancet Oncology}).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{...}{additional parameters for \code{\link[ggplot2]{discrete_scale}}}
}
\description{
See \code{\link{pal_lancet}} for details.
}
\examples{
library("ggplot2")
data("diamonds")
ggplot(
subset(diamonds, carat >= 2.2),
aes(x = table, y = price, colour = cut)
) +
geom_point(alpha = 0.7) +
geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) +
theme_bw() + scale_color_lancet()
ggplot(
subset(diamonds, carat > 2.2 & depth > 55 & depth < 70),
aes(x = depth, fill = cut)
) +
geom_histogram(colour = "black", binwidth = 1, position = "dodge") +
theme_bw() + scale_fill_lancet()
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/scale_gsea.Rd 0000644 0001762 0000144 00000002374 14570505642 014514 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/continuous-gsea.R
\name{scale_color_gsea}
\alias{scale_color_gsea}
\alias{scale_colour_gsea}
\alias{scale_fill_gsea}
\title{The GSEA GenePattern Color Scales}
\usage{
scale_color_gsea(palette = c("default"), alpha = 1, reverse = FALSE, ...)
scale_colour_gsea(palette = c("default"), alpha = 1, reverse = FALSE, ...)
scale_fill_gsea(palette = c("default"), alpha = 1, reverse = FALSE, ...)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"default"}
(continuous palette with 12 base colors).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{reverse}{Logical. Should the order of the colors be reversed?}
\item{...}{additional parameters for \code{\link[ggplot2]{discrete_scale}}}
}
\description{
See \code{\link{pal_gsea}} for details.
}
\examples{
library("ggplot2")
library("reshape2")
data("mtcars")
cor <- cor(mtcars)
cor_melt <- melt(cor)
ggplot(
cor_melt,
aes(x = Var1, y = Var2, fill = value)
) +
geom_tile(colour = "black", size = 0.3) +
theme_bw() + scale_fill_gsea()
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/pal_locuszoom.Rd 0000644 0001762 0000144 00000001626 14570505642 015313 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-locuszoom.R
\name{pal_locuszoom}
\alias{pal_locuszoom}
\title{LocusZoom Color Palette}
\usage{
pal_locuszoom(palette = c("default"), alpha = 1)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"default"}
(7-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
}
\description{
Color palettes based on the colors used by LocusZoom.
}
\examples{
library("scales")
show_col(pal_locuszoom("default")(7))
show_col(pal_locuszoom("default", alpha = 0.6)(7))
}
\references{
Pruim, Randall J., et al. (2010). LocusZoom: regional visualization of
genome-wide association scan results. \emph{Bioinformatics},
26(18), 2336--2337.
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/pal_startrek.Rd 0000644 0001762 0000144 00000001364 14570505642 015117 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-startrek.R
\name{pal_startrek}
\alias{pal_startrek}
\title{Star Trek Color Palettes}
\usage{
pal_startrek(palette = c("uniform"), alpha = 1)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"uniform"}
(7-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
}
\description{
Color palettes inspired by the colors used in \emph{Star Trek}.
}
\examples{
library("scales")
show_col(pal_startrek("uniform")(7))
show_col(pal_startrek("uniform", alpha = 0.6)(7))
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/scale_d3.Rd 0000644 0001762 0000144 00000003670 14570505642 014103 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-d3.R
\name{scale_color_d3}
\alias{scale_color_d3}
\alias{scale_colour_d3}
\alias{scale_fill_d3}
\title{D3.js Color Scales}
\usage{
scale_color_d3(
palette = c("category10", "category20", "category20b", "category20c"),
alpha = 1,
...
)
scale_colour_d3(
palette = c("category10", "category20", "category20b", "category20c"),
alpha = 1,
...
)
scale_fill_d3(
palette = c("category10", "category20", "category20b", "category20c"),
alpha = 1,
...
)
}
\arguments{
\item{palette}{Palette type.
There are 4 available options:
\code{"category10"} (10-color palette);
\code{"category20"} (20-color palette);
\code{"category20b"} (20-color palette);
\code{"category20c"} (20-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
\item{...}{additional parameters for \code{\link[ggplot2]{discrete_scale}}}
}
\description{
See \code{\link{pal_d3}} for details.
}
\examples{
library("ggplot2")
data("diamonds")
p1 <- ggplot(
subset(diamonds, carat >= 2.2),
aes(x = table, y = price, colour = cut)
) +
geom_point(alpha = 0.7) +
geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) +
theme_bw()
p2 <- ggplot(
subset(diamonds, carat > 2.2 & depth > 55 & depth < 70),
aes(x = depth, fill = cut)
) +
geom_histogram(colour = "black", binwidth = 1, position = "dodge") +
theme_bw()
p1 + scale_color_d3()
p2 + scale_fill_d3()
p1 + scale_color_d3(palette = "category20")
p2 + scale_fill_d3(palette = "category20")
p1 + scale_color_d3(palette = "category20b")
p2 + scale_fill_d3(palette = "category20b")
p1 + scale_color_d3(palette = "category20c")
p2 + scale_fill_d3(palette = "category20c")
}
\references{
\url{https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md}
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/pal_flatui.Rd 0000644 0001762 0000144 00000001571 14570505642 014544 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-flatui.R
\name{pal_flatui}
\alias{pal_flatui}
\title{Flat UI Color Palettes}
\usage{
pal_flatui(palette = c("default", "flattastic", "aussie"), alpha = 1)
}
\arguments{
\item{palette}{Palette type.
Currently there are three available option:
\code{"default"} (10-color palette).
\code{"flattastic"} (12-color palette).
\code{"aussie"} (10-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
}
\description{
Color palettes inspired by the colors used in \emph{Flat UI Colors}.
}
\examples{
library("scales")
show_col(pal_flatui("default")(10))
show_col(pal_flatui("flattastic")(12))
show_col(pal_flatui("aussie")(10))
show_col(pal_flatui("aussie", alpha = 0.6)(10))
}
\author{
Clara Jégousse <\email{cat3@hi.is}>
}
ggsci/man/pal_jama.Rd 0000644 0001762 0000144 00000001431 14570505642 014163 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete-jama.R
\name{pal_jama}
\alias{pal_jama}
\title{Journal of the American Medical Association Color Palettes}
\usage{
pal_jama(palette = c("default"), alpha = 1)
}
\arguments{
\item{palette}{Palette type.
Currently there is one available option: \code{"default"}
(7-color palette).}
\item{alpha}{Transparency level, a real number in (0, 1].
See \code{alpha} in \code{\link[grDevices]{rgb}} for details.}
}
\description{
Color palette inspired by plots in
\emph{The Journal of the American Medical Association}.
}
\examples{
library("scales")
show_col(pal_jama("default")(7))
show_col(pal_jama("default", alpha = 0.6)(7))
}
\author{
Nan Xiao <\email{me@nanx.me}> |
<\href{https://nanx.me}{https://nanx.me}>
}
ggsci/man/figures/ 0000755 0001762 0000144 00000000000 14570505642 013575 5 ustar ligges users ggsci/man/figures/README-ggsci-gsea-1.png 0000644 0001762 0000144 00000307660 14570505642 017421 0 ustar ligges users PNG
IHDR @ |']&