Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

Chapter 16. Advanced graphics > Interactive graphs - Pg. 394

394 C HAPTER 16 Advanced graphics Comparing the distribution of heights is easier in this format than in the format pre- sented in figure 16.1. (Once again, this looks better when displayed in color.) We've only scratched the surface of this powerful graphical system. Interested readers are referred to Wickham (2009), and the ggplot2 website ( ggplot2/) for more information. We'll end this chapter with a review of interactive graphics and R functions that support them. 16.4 Interactive graphs The base installation of R provides limited interactivity with graphs. You can modify graphs by issuing additional program statements, but there's little that you can do to modify them or gather new information from them using the mouse. However, there are contributed packages that greatly enhance your ability to interact with the graphs you create. In this section, we'll focus on functions provided by the playwith , latti- cist , iplots , and rggobi packages. Be sure to install them before first use. 16.4.1 Interacting with graphs: identifying points Before getting to the specialize packages, let's review a function in the base R installa- tion that allows you to identify and label points in scatter plots. Using the identify() function, you can label selected points in a scatter plot with their row number or row name using your mouse. Identification continues until you select Stop or right-click on