Chapter 14. Three-dimensional Visualizations

In this chapter, we will cover the following recipes:

In basic data visualization, we usually think about a two-dimensional plot, but in some situations, it is important to produce three-dimensional visualizations in order to see the relationship between variables. In this chapter, we will focus on three-dimensional visualizations using the R libraries in order to create three-dimensional plots. We will mainly cover the basic visualizations such as scatter plots, bar charts, kernel density plots, surface plots, and contour plots.

In this chapter, we will use the airquality dataset from the datasets library. This contains 153 observations with the following variables:

For more details about the dataset, consult the help documentation of this dataset by writing ?airquality in the R console. Now, let's enter the actual recipe to see the pattern of this data.