+5 votes
in Programming Languages by (18.0k 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

+1 vote
by (41.9k points)

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

+5 votes
1 answer
asked Sep 16, 2021 in Programming Languages by praveen (18.0k points)
+2 votes
1 answer
+5 votes
1 answer
asked Sep 25, 2021 in Programming Languages by kush (9.6k points)
...