theme_lares | R Documentation |
Based on hrbrthemes
' theme_ipsum
and customized for lares
usage.
With this team you can custom the colour and fill palettes, global colour parameters,
major and minor grids, legend, font and font size.
theme_lares(
font = Sys.getenv("LARES_FONT"),
size = 12,
main_colour = "darkorange3",
hard_colour = "black",
soft_colour = "grey30",
plot_colour = "transparent",
panel_colour = "transparent",
background = "transparent",
no_facets = FALSE,
legend = NULL,
grid = TRUE,
axis = TRUE,
clean = FALSE,
mg = 9,
pal = 0,
palette = NULL,
which = "fc",
quiet = TRUE,
...
)
font , size |
Character and numeric. Base font family and base size for texts.
|
main_colour , hard_colour , soft_colour , plot_colour , panel_colour |
Character. Main colours for your theme. |
background |
Character. Main colour for your background. Overwrites
|
no_facets |
Boolean. Suppress facet labels? |
legend |
Character. Legend position: |
grid |
Character or Boolean. Use |
axis |
Character or Boolean. Use |
clean |
Boolean. Suppress grids and axis? Overwrites both parameters. |
mg |
Numeric. External margins reference. |
pal |
Integer. |
palette |
Character vector. Pass a vector with HEX colour codes to use a custom palette. If you pass a named vector, the name values will be used as fill and the values will be used as colour. |
which |
Character. When |
quiet |
Boolean. Keep quiet? If not, message will be shown. |
... |
Additional parameters. |
Themed ggplot2 object
First and foremost, Arial Narrow is generally installed by default or readily available on any modern system, so it's "free"-ish; plus, it is a condensed font with solid default kerning pairs and geometric numbers.
Other Themes:
gg_fill_customs()
,
lares_pal()
,
plot_palette()
data(dft)
library(ggplot2)
p <- ggplot(dft, aes(x = Pclass, y = sum(Fare), fill = Pclass)) +
geom_col()
p + theme_lares()
p + theme_lares(pal = 1)
p + theme_lares(background = "#999999", mg = 25)
p + theme_lares(legend = "top", grid = "Yy")
p + theme_lares(clean = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.