gg_sus: Creates a SUS curve plot

View source: R/gg_sus.R

gg_susR Documentation

Creates a SUS curve plot

Description

gg_sus creates a SUS plot in ggplot2 graphics.

Usage

gg_sus(...)

Arguments

...

Optional parameters which can be supplied to geom_line.

Value

Returns ggplot2 plot of SUS scores vs percentile ranks.

See Also

sus_to_percentile, sus_suaro

Examples

p <- gg_sus()
p

df <- sus_to_percentile(68)
p + geom_point(data = df, aes(x, y), colour = "red") 

df <- cbind(df, Phase = "End of Record Test") 
p + 
  geom_point(data = df, aes(x, y, colour = Phase)) +
  geom_segment(data = df, aes(x = 0, xend = x, y = y, yend = y,
    colour = Phase, linetype = Phase)) +
  geom_segment(data = df, aes(x = x, xend = x, y = 0, yend = y,
    colour = Phase, linetype = Phase)) +
  scale_x_continuous(expand = c(0,0)) +
  scale_y_continuous(expand = c(0,0)) +
  scale_colour_manual(breaks = "End of Record Test", values = "#E69F00") +
  scale_linetype_manual(breaks = "End of Record Test", values = 2) +
  labs(y = "Percentile Rank", x = "SUS Score")

rm(list = c("p", "df"))


jjw3952/mcotear documentation built on Sept. 2, 2023, 10:30 a.m.