I would do it like this:
library(ggplot2)
library(nlme)
data(Orthodont)
model <- lm(distance ~ age * Sex, data = Orthodont)
Orthodont$resid <- resid(model)
ggplot(Orthodont, aes(x = as.factor(age), y = resid, fill = Sex)) +
geom_boxplot(alpha = 0.6) +
coord_flip() +
labs(
x = "Age",
y = "Residuals",
title = "Residuals by Age",
subtitle = "Colored by Sex (Equivalent to lattice::bwplot)"
) +
theme_minimal() +
scale_fill_manual(values = c("steelblue", "tomato"))