Above all else show the data.
Edward R. Tufte (2001)
Three key questions, addressed in this chapter are:
What makes a good graph?
How can we create graphs in R?
A lot of smart people have provided long and elaborate answers to the first two questions, but none of them are simple or fully satisfying. The first part of this chapter, we will consider some answers and recommendations by experts and look at some visualizations to consider their benefits and pitfalls. This will illustrate that visualizations can be good and bad at conveying some message, depending on their design and purpose — an insight that generally holds true for representations (see Section 1.2).
The rest of this chapter is concerned with particular tools and technologies for creating visualizations using base R. And rather than evaluating visualizations, we focus on creating some relatively simple types of graphs. But the insight that any representation can be good or bad at serving particular purposes is an important point to keep in mind throughout this chapter and book. To still provide a tentative answer to our initial question (“Why visualize data?”), the following sections will motivate our efforts with a notorious example.
This chapter introduces the platting functions of base R (or R’s graphics package).
4.1.2 Data and tools
This chapter uses functions of base R (or R’s graphics package).