I have the following kind of interaction plot made with sjPlot, showing an interaction between two categorical variables. The levels seem to appear alphabetically in the plot - however, I would like them ordered low -> average -> high.
The code used to generate this plot is
plot_model(model, type = "pred", terms = c("education", "gender"))
Is there a way to specify/change the order in which levels of a factor are supposed to show up in the plot? Seems related to this question which unfortunately received no answers: Reorder groups of factor for sjPlot::plot_model in R and to this one as well, but I would have to access something else than the facets Adjusting facet order and legend labels when using plot_model function of sjplot
Edit: Another example with the starwars dataset from dplyr:
library(dplyr)
library(sjPlot)
model = lm(height ~ gender*species, data = starwars[starwars$species == "Human" | starwars$species == "Droid" | starwars$species == "Twi'lek",])
plot = plot_model(model, type = "pred", terms = c("species", "gender"))
Say I would prefer to have the humans in the middle of the plot to be better able to see how they differ from droids and Twi'lek on each side. scale_x_discrete(limits = c("low", "average", "high")) unfortunately only changes the labels of the x-axis, but I would like to move not only the labels but also the corresponding data points around on the x-axis.