View source: R/theme_grafify.R
theme_grafify | R Documentation |
theme_classic()
for grafify
-like graphs.This is a slightly modified theme_classic[ggplot2]
with two key differences: no border & background for facet panel labels, and font size of text on axes is the same as that of the axes titles (prior to v3.2.0, this was 0.85 times the base font size). The size of text legend title is also same as base font.
theme_grafify(
base_size = 20,
base_family = "",
base_line_size = base_size/22,
base_rect_size = base_size/22,
TextXAngle = 0,
vjust = 0,
hjust = 0,
...
)
base_size |
base font size for all text (default is 20). Other text is relative to this. |
base_family |
default font family |
base_line_size |
default line size (default is base font size/22) |
base_rect_size |
default size of rectangles (default is base font size/22) |
TextXAngle |
orientation of text on X-axis; default 0 degrees. Change to 45 or 90 to remove overlapping text. |
vjust |
vertical adjustment of X-axis text alignment (between 0 and 1). Set |
hjust |
horizontal adjustment of X-axis text alignment (between 0 and 1). Set |
... |
for any other arguments to pass to |
Since v3.2.0, theme_grafify
produces transparent backgrounds.
this returns an output with class "theme" and "gg".
ggplot(mpg, aes(drv, cty, colour = fl))+
geom_jitter(width = 0.2,
size = 3, alpha = .7)+
theme_grafify()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.