## 11.40 Line Chart Log Custom Labels

REVIEW

mm <- function(x) { sprintf("%smm", x) }

ds                                                                    %>%
filter(rainfall != 0)                                               %>%
ggplot(aes(x=rainfall))                                              +
geom_density()                                                       +
scale_x_log10(breaks=c(1, 10, 100), labels=mm)                       +
annotation_logticks(sides="bt")                                      +
theme(legend.position="none")

% %———————————————————————– % ## Pairs Plot: Using ggpairs() % %———————————————————————–

% <<ggplot2:ggpairs, echo=FALSE, fig.width=12, fig.height=12, out.width=‘\textwidth,’ message=FALSE} % weather[c(3,4,6,7,10,19,22,24)] %>% % na.omit() %>% % ggpairs(cardinality_threshold=16) % @

% <<ggplot2:ggpairs_echo, eval=FALSE} % @

% A sophisticated pairs plot, as delivered by GGally::ggpairs() from % , brings together many of the kinds of plots we have % already seen to compare pairs of variables. Here we have used it to % plot the dataset from . We see % scatter plotes, histograms, and box plots in the pairs plot.

Your donation will support ongoing development and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984.