Book Image

R Graphs Cookbook Second Edition

Book Image

R Graphs Cookbook Second Edition

Overview of this book

Table of Contents (22 chapters)
R Graphs Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


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:

  • Ozone: Ozone (the mean ozone in parts per billion (ppb) from 1300–1500 hours at Roosevelt Island)

  • Solar.R: Solar R (the solar radiation in Langleys (lang) in the 4000–7700 Angstroms frequency band from 0800–1200 hours at Central Park)

  • Wind: The wind (the average wind speed in miles per hour (mph) at 0700 and 1000 hours at LaGuardia Airport)

  • Temp: The temperature (the...