File: scale_locuszoom.Rd

package info (click to toggle)
r-cran-ggsci 2.9-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,352 kB
  • sloc: makefile: 2
file content (46 lines) | stat: -rw-r--r-- 1,397 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
% 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}>
}