8. Graphical Methods I

The graphics capabilities in Splus are an interactive, informative, and flexible way to look at data. In order to plot graphs in Splus it is necessary to open a graphics device:

> X11()

Other options are openlook() and motif().

To close the graphics window:

> dev.off()

The following commands create a simple scatterplot; the semicolon is used to put more than one command on the line.

> X11(); plot(1:10,1:10)

View plot

Arguments which add titles or modify the appearance of the plot can be included in the function:

> plot(1:10,1:10,type="l",main="Straight line")

View plot

> hist(rnorm(100), main="Histogram of 100 random normal data points")

View histogram

Where to now?

Table of Contents

Graphical Methods II