| theme_portinari | R Documentation |
A complete ggplot2 theme that dresses a plot like one of Portinari's
canvases: a warm ground of raw linen, firm drawn contours instead of a boxed
panel, earth-colored lettering and an optional painted frame. Two further
moods follow his United Nations panels: the deep indigo of Guerra and the
golden light of Paz. Pair it with scale_color_portinari() and
scale_fill_portinari().
theme_portinari(
mood = c("canvas", "guerra", "paz"),
base_size = 11,
base_family = "",
grid = c("y", "x", "xy", "none"),
frame = TRUE
)
mood |
The overall look. |
base_size |
Base font size, in points. |
base_family |
Base font family. |
grid |
Which major grid lines to draw: |
frame |
If |
A ggplot2 theme object.
The light moods share their ground with the lightest colors of several
palettes (the creams of cafe and paz, the light centers of the diverging
palettes, the pale ends of the sequential ones). That is natural for filled
areas such as heatmaps, where the center then reads as neutral, but those
colors fade when used for points or lines. The guerra mood uses the indigo
that starts guerra and guerra_azul, so pair it with other palettes, for
example paz or sofia: the ground of War with the colors of Peace.
scale_color_portinari(), scale_fill_portinari()
library(ggplot2)
ggplot(mtcars, aes(wt, mpg, colour = factor(cyl))) +
geom_point(size = 3) +
scale_color_portinari("paz", name = "Cylinders") +
labs(title = "Fuel economy", subtitle = "Heavier cars travel less per gallon") +
theme_portinari()
ggplot(mpg, aes(class, fill = drv)) +
geom_bar() +
scale_fill_portinari("sofia") +
theme_portinari("guerra")
ggplot(faithfuld, aes(waiting, eruptions, fill = density)) +
geom_raster() +
scale_fill_portinari("roxa_terra", type = "continuous", direction = -1) +
theme_portinari("paz", grid = "none", frame = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.