# simplest case (no labels), will auto revert to y labels
tinyplot(1:12, type = "text")
# pass explicit `labels` arg if you want specific text
tinyplot(1:12, type = "text", labels = month.abb)
# for advanced customization, it's safer to pass args through `type_text()`
tinyplot(1:12, type = type_text(
labels = month.abb, family = "HersheyScript", srt = -20))
# same principles apply to grouped and/or facet data
tinyplot(mpg ~ hp | factor(cyl),
data = mtcars,
type = type_text(
labels = row.names(mtcars),
family = "HersheySans",
font = 2,
adj = 0
)
)
# tip: use `xpd = NA` to avoid clipping text at the plot region
tinyplot(mpg ~ hp | factor(cyl),
data = mtcars,
type = type_text(
labels = row.names(mtcars),
family = "HersheySans",
font = 2,
adj = 0,
xpd = NA
)
)
Run the code above in your browser using DataLab