Search code examples
rsmoothingboxplot

Plot only smooth line?


I want to do a plot of just the lowess line of my boxplot. Is there a way to show only that line in the plot and delete the boxplot?

I have this.

du=boxplot(Q~Duration)
lines(lowess(du$stats[3,],f=1/5))

enter image description here

Or is there other function to show that line or type of relation?

Thank you!


Solution

  • Use plot() to just plot the output of lowess, likely with type="l" to draw data as a line, so:

    plot(lowess(du$stats[3,],f=1/5),type="l")