View source: R/element_part_rect.R
element_part_rect | R Documentation |
The element_part_rect()
function draws sides of a rectangle as theme
elements. It can substitute element_rect()
theme elements.
element_part_rect(
side = "tlbr",
fill = NULL,
colour = NULL,
linewidth = NULL,
linetype = NULL,
color = NULL,
inherit.blank = FALSE
)
side |
A |
fill |
Fill colour. |
colour , color |
Line/border colour. Color is an alias for colour. |
linewidth |
Line/border size in mm. |
linetype |
Line type. An integer (0:8), a name (blank, solid, dashed, dotted, dotdash, longdash, twodash), or a string with an even number (up to eight) of hexadecimal digits which give the lengths in consecutive positions in the string. |
inherit.blank |
Should this element inherit the existence of an
|
An S3 object of class element_part_rect
.
ggplot(iris, aes(Sepal.Width, Sepal.Length)) +
geom_point() +
facet_grid(Species ~.) +
theme(
strip.background = element_part_rect(side = "tb", colour = "black"),
panel.background = element_part_rect(side = "l", colour = "black")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.