plot command presenting error for labels

First, I would have used a reprix here but I'm using data with ten waves and I'm plotting a regression equation so it is just not feasible. Apologies in advanced. Although this is more than likely a simple fix. As you can see (screenshot) I'm trying to add a main title and x and y labels to the "plot" syntax but I'm getting this error on the bottom. I've tried messing with it several times and the problem remains.

plot(GranminfullinterRS1.p, colors = "bw", ci = FALSE, main = "GM Mod", xlab = "Wave 1-10", ylab = "GM")

^ this is the code that I'm trying to get to work.

plot(GranminfullinterRS1.p, colors = "bw", ci = FALSE)
^ when it is like this it works fine.

I am guessing that you are using the plot() function of the ggeffects package. If that is true, the plot() function uses ggplot2 to make the graph. The following might work. I just appended to your plot() function the ggplot2 syntax for controlling the plot labeling .

plot(GranminfullinterRS1.p, colors = "bw", ci = FALSE) + labs(title = "GM Mod", x = "Wave 1-1-", y = "GM")
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.