Yep, I often do this during my data manipulation step.
Using factor(), you can set the levels (which sets the order of the levels based on the current values) and the labels (replace the current levels with new values; must be in the same order as levels to work correctly).
For example, prior to plotting you could do
tibble(type = c('a','b','c'),
x = c(1,2,3),
y = c(10,0,10)) %>%
mutate(type = factor(type,
levels = c("a", "b", "c"),
labels = c("hello", "world", "again")))
The forcats package has a lot of handy functions for working with factors. The fct_recode() function is for recoding values to new ones. Note the order is new label = old label (I'm sure I'd get this backwards if I hadn't looked at the documentation just now).
tibble(type = c('a','b','c'),
x = c(1,2,3),
y = c(10,0,10)) %>%
mutate(type = forcats::fct_recode(type,
hello = "a",
world = "b",
again = "c"))