Skip to contents

Convert ggplot theme font size to geom_text size

Usage

ggtext_size(base_size, ratio = 0.8)

Arguments

base_size

theme font size

ratio

ratio of text size to theme font size. Defaults to .8 so that geom text will be the same size as default sized axis labels.

Value

numeric vector

Examples


ggtext_size(16)
#> [1] 4.498685