[R] plot(aov, which=1) with different labels?

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Thu Jun 20 10:37:35 CEST 2024


On 2024-06-20 2:01 a.m., DynV Montrealer wrote:
> I need to do a non-English report including the red line from plot(aov,
> which=1), which I don't know how to reproduce. I'm thinking that if I
> replace the labels that it would be good (so no English remains). What I
> have so far is almost what I need, the only thing that needs to change is
> what's right above the plot: Residuals vs Fitted; I'd like it to either be
> changed to "Résidus vs Valeurs prédites" or not be displayed. Covering up
> "Residuals vs Fitted" seems like a good alternative, perhaps to do so would
> require plot(aov, which=1) to be assigned in an object then modify that
> object then display it. How I got to where I am:
> my_aov <- aov(...) plot(my_aov, which=1, ann=FALSE) title(main="Mon titre",
> xlab="Valeurs prédites", ylab="Résidus")
> 
> Thank you kindly for your help

Plotting an aov object is done by stats:::plot.lm.  From the help page 
?plot.lm, I think the value that you want to change is the "caption" 
argument, i.e.


  plot(my_aov, which=1, ann=FALSE,
        caption = "Résidus vs Valeurs prédites")
  title(xlab="Valeurs prédites", ylab="Résidus", main="Mon titre")

You can use `caption = NA` to suppress it.

Duncan Murdoch



More information about the R-help mailing list