Preface
As a very powerful open source language, R is rapidly becoming a standard in the scientific community, particularly for data analysis and data visualization. This is related mainly to the vast availability of library packages, which empower the user to apply this software in virtually any field of scientific research. In relation to data visualization, R provides a rich palette of tools, and among the packages available, ggplot2 is fast becoming one of the more sophisticated and advanced packages. Its use is constantly growing in the community of R users. This increasing interest is particularly related to the ggplot2 capability of creating high-quality plots with a very appealing layout and coding that is sufficiently easy to use.
As a scripting language, R may be difficult to master, but in this book, you will find a large number of examples and tips as well as detailed explanations, which will provide you with all the necessary tools to understand the concepts behind ggplot2 in depth and concretely apply them to solve everyday problems related to data visualization. You will see step-by-step descriptions, ranging from the basic applications of ggplot2 in realizing simple plots up to the realization of more advanced and sophisticated plots. We will also dig into controlling plot details, which will enable you to perform a full customization of the plot you intend to realize. Finally, we will also see more special applications of ggplot2, for instance, regarding how to include map data in plots, realize heatmaps, and realize matrix scatterplots using additional packages based on ggplot2.
By the end of this book, you will not only have learned how to use the full potential of ggplot2, but you will also be able to generate publication-quality plots. Moreover, you will also be able to use this book and its examples as a reference for daily questions concerning the use of ggplot2 for data representation.