+5 votes
in Programming Languages by (72.7k points)
edited by

I did not find "main" in the list of arguments of scatter.smooth() function. How can I add a title to the plot generated by this function?

1 Answer

+2 votes
by (354k points)
selected by
 
Best answer

If you look at the list of arguments of scatter.smooth(), it has an argument "..." which can be used to pass graphical parameters. So, you can use "main" to add the title to scatter.smooth() plot.

scatter.smooth(x, y = NULL, span = 2/3, degree = 1,
    family = c("symmetric", "gaussian"),
    xlab = NULL, ylab = NULL,
    ylim = range(y, pred$y, na.rm = TRUE),
    evaluation = 50, ..., lpars = list())

Here is an example to show how to use "main."

scatter.smooth(x, y, main="plot title here")

Related questions

+2 votes
1 answer
+3 votes
1 answer
+5 votes
1 answer
asked Sep 16, 2021 in Programming Languages by praveen (72.7k points)

...