Desktop Survival Guide
by Graham Williams
It is useful to know how we interact with plots in Rattle. Often we will generate plots and want to include them in our own reports. Plots are generated from various places within the Rattle interface.
Rattle uses the Cairo device which is a vector graphics engine for displaying high quality graphic plots. If the Cairo device is not available within your installation then Rattle resorts to the default window device for the operating system (x11 for GNU/Linux and window for MS/Windows). The Settings menu also allows control of the choice of graphics device (allowing us to use the default by disabling support for Cairo). The Cairo device has a number of advantages, one being that the device can be encapsulated within other windows, as is done with Rattle. This allows Rattle to provide some operating system-independent functionality and a common interface. If we choose not to use the Cairo device, we will have the default devices, which still work just fine, but with less obvious functionality.
Figure 2.6 shows a typical Rattle plot window. At the bottom of the window we see a series of buttons that allow us to Save the plot to file, to Print the plot, and to Close the plot.
The Save button allows us to save the graphics to a file in one of the supported formats. The supported formats include pdf (good for high resolution pictures), png (good for vector images and text), jpg (good for colourful images), svg (for general scalable vector graphics), and, on MS/Windows, wmf (for MS/Windows specific vector graphics). A popup will request the filename to save to. The default is to save as PDF format, saving to a file with the filename extension of .png. You can choose to save in the other formats simply by specifying the appropriate filename extension.
The Print button will send the plot off to a printer. This requires the underlying R application to have been set up properly to access the required printer. This should be the case by default.
Once we are finished with the plot we can click the Close button to shut down that particular plot window.
Copyright © Togaware Pty Ltd Support further development through the purchase of the PDF version of the book.