Introduction to Statistics (MAT/SST 115.03 2008S)

Working with Multiple Graphics Windows


Most of the time, R treats your graphics window as a scratch area - When you create a new graph, R throws away the old graph and replaces it with the new one. And, for lots of the data exploration you will do in R, such behavior is perfectly appropriate. However, there are times when you want to compare different graphs.

In R, to create a graph in a new window, you need to tell R to start working in that new window. Unfortunately, the way we create a new output window depends on the computer system we're using. On Linux (which we use in class), the command is X11(). On a Mac, the command is quartz(). On Microsoft windows, the command is windows().

R also provides a host of other commands for managing the many graphics windows you have open. However, for this class (and for most uses), it should suffice to create a new window when you want to keep the previous graph around for awhile.

Creative Commons License

Samuel A. Rebelsky, rebelsky@grinnell.edu

Copyright (c) 2007-8 Samuel A. Rebelsky.

This work is licensed under a Creative Commons Attribution-NonCommercial 2.5 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/2.5/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.