Go to TogaWare.com Home Page. Data Science Desktop Survival Guide
by Graham Williams
Duck Duck Go



CLICK HERE TO VISIT THE UPDATED SURVIVAL GUIDE

Scatter Plot Smooth Loess

20180603

\includegraphics[width=\textwidth]{figures/onepager/ggplot2:iris_scatter_smooth-1}

set.seed(26439)
ds %>%
  sample_n(100) %>%
  ggplot(aes(x=min_temp, y=max_temp)) +
  geom_point() +
  stat_smooth(method="loess", formula=y~x)

A smooth curve here fits the statistical loess function for a single smoother line to the points.

The resulting plot uses ggplot2::geom_smooth() with a so called locally weighted scatterplot smoothing method or LOESS to produce the smoothed line. As a result we can observe statistically something of a relationship between the two variables although it is not a simple relationship.


Support further development by purchasing the PDF version of the book.
Other online resources include the GNU/Linux Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 2000-2020 Togaware Pty Ltd. . Creative Commons ShareAlike V4.