highlight_labs: highlight_labs

View source: R/highlight_labs.R

highlight_labsR Documentation

highlight_labs

Description

The counterpoint to blank_labs(), this function makes selected labels bold, italic, and colorful.

Usage

highlight_labs(which_lab, txt_col = "#005792", font_face = 4, ...)

Arguments

which_lab

Which label to highlight? Accepts a vector of 1 or more numbers or strings:

  • 1 = "title"

  • 2 = "x-lab"

  • 3 = "y-lab

  • 4 = "x-vals"

  • 5 = "y-vals"

  • 6 = "legend title"

  • 7 = "legend text"

  • 8 = "all"

txt_col

Color of label text; default= "#005792" (Dark GP Hydrogen Blue)

font_face

style of highlighted labels and title fonts; 1=plain, 2= bold, 3=italic, 4=bold+italic; default= 4

Details

This is used to make teacher graphs where it's clear what students will fill in on the blanked graph.

See Also

Other functions for enigmatizing graphs: blank_labs()

Examples

require(ggplot2)
ggplot(mtcars,aes(x=mpg,y=hp))+geom_point()+
theme_galactic()+ggtitle("Normal graph")

ggplot(mtcars,aes(x=mpg,y=hp))+geom_point()+
theme_galactic()+highlight_labs(c(2,3))

galacticpolymath/galacticEdTools documentation built on July 14, 2022, 6:02 a.m.