set_font {ggfun} | R Documentation |
set_font
Description
setting font for ggplot (axis text, label, title, etc.)
Usage
set_font(p, family = "sans", fontface = NULL, size = NULL, color = NULL)
Arguments
p |
ggplot object |
family |
font fammily |
fontface |
font face |
size |
font size |
color |
font color |
Value
TableGrob object
Author(s)
Guangchuang Yu
Examples
library(grid)
library(ggplot2)
d <- data.frame(x=rnorm(10), y=rnorm(10), lab=LETTERS[1:10])
p <- ggplot(d, aes(x, y)) + geom_text(aes(label=lab), size=5)
set_font(p, family="Times", fontface="italic", color='firebrick')
[Package ggfun version 0.1.5 Index]