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

Line Chart Basic

20180603

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

set.seed(26439)
ds %>%
  sample_n(100) %>%
  ggplot(aes(x=min_temp, y=max_temp)) +
  geom_line()

As an alternative to plotting the points we could join the dots and plot a line. One reason for doing so might be to attempt to observe more clearly any relationship between the two dimensions (i.e., the two variables we are plotting). Add a ggplot2::geom_line() to the canvas we can draw a line from left to right the follows the points exactly. The result is a rather jugged line and it is debatable whether it has added any further insight into our understanding of the data.


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.