changing the position of the legend:
I just want to answer the question in case any other comes here and want to try what worked for me.
I don't know which package the there is used to make the effect plot but I had the same problem and adding key.args = list(space="top"))
to my code worked. To make the effect plot I used the effect package.
Here is an example of my code:
library(effects)
library(car)
library(MASS)
library(splines)
library(lattice)
plot(Effect(focal.predictors = c("income","age", "country"),
mod = mymodel, xlevels = list(age = 50:80), latent = TRUE),
rug = FALSE, axes = list(grid = TRUE), multiline=TRUE,
colors = c("color1", "color2", "color3", "color4", "color5"),
lattice = list(layout = c(5,1), key.args = list(space="top")))
just add number of colors according how many categories you have. I had 5 categories of income, so I wrote name of 5 colors I liked. If you want the legend at the right side of the plot you can just write "right" instead of "top".