Skip to contents

Builds the text caption for the grade range plot. The caption can be optionally turned off on the ggplot2 object which is useful when the text is not needed or rendered well on the image file. Instead, the Shiny app creates a separate text box for the caption.

Usage

caption_builder(
  min_passing_grade,
  max_passing_grade,
  caption_width = 150,
  show_caption = TRUE
)

Arguments

min_passing_grade

the worst possible grade

max_passing_grade

the best possible grade

caption_width

text width for the caption. default 150

show_caption

whether or not to display the text caption

Value

a character string

Examples


caption_builder(min_passing_grade = 5, max_passing_grade = 1)
#> [1] "The shaded region represents the range of all possible grade averages that can be achieved based on three factors: 1) the current grade average\nor GPA, 2) the number of ECTS credits already completed, and 3) the amount of remaining ECTS. The red line indicates the worst possible scenario\ni.e. obtaining 5s in all classes while the green line indicates the best possible scenario i.e. obtaining 1s in all classes. The blue dashed line\nrepresents the highest passing grade."