-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathbackground_color.Rd
More file actions
39 lines (35 loc) · 1.02 KB
/
background_color.Rd
File metadata and controls
39 lines (35 loc) · 1.02 KB
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bgCol.R
\name{background_color}
\alias{background_color}
\title{gsplot background_color}
\usage{
background_color(object, ...)
}
\arguments{
\item{object}{gsplot object}
\item{\dots}{Further graphical parameters may also be supplied as arguments. See 'Details'.}
}
\description{
Adds color to the plot background.
}
\examples{
gs <- gsplot() \%>\%
points(y=c(3,1,2), x=4:6, xlim=c(0,NA),legend.name="Points") \%>\%
background_color(col="lightgrey") \%>\%
lines( c(3,4,3), c(2,4,6), legend.name="Lines", side=c(3,4)) \%>\%
legend(location="topleft")
gs
gs <- gsplot() \%>\%
points(1:100, rnorm(100,mean=10000, sd=1000), log="y") \%>\%
background_color(col="lightgrey")
gs
gs <- gsplot() \%>\%
points(1:100, rnorm(100,mean=10000, sd=1000), log="y") \%>\%
background_color() #yaml specifies lightgrey
gs
gs <- gsplot() \%>\%
points(1:100, rnorm(100,mean=10000, sd=1000), log="y") \%>\%
background_color("lightgoldenrod")
gs
}