load_theme_ltx: Import Latin Modern Roman font and color palette

Description Usage Examples

View source: R/load_theme_ltx.R

Description

This function adds Latin Modern Roman font using sysfonts and color palette to R options.

Usage

1

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(ggplot2)
library(ltxplot)
load_theme_ltx()
df <- mtcars
df$carb <- as.factor(df$carb)
ggplot(df, aes(x=carb, fill = carb))+
  geom_bar(stat= "count", width=0.7)+
  labs(title = 'Number of cars with different number of carburetors',
       x = "Number of carburetors",
       y = "Number of car models",
       tag = 'Figure 1',
       caption = "Data source: mtcars") +
  theme_latex(base_size = 14) +
  theme(legend.position = "none")

alicewchen/ltxplot documentation built on May 5, 2021, 12:15 a.m.