12.07.2015 Views

R dummies

R dummies

R dummies

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

+ xlab = “Eruption time (min)”,+ ylab = “Waiting time to next eruption (min)”)Your graphic should look like Figure 16-6.Changing plot optionsYou can change the look and feel of plots with a large number of options.You can find all the documentation for changing the look and feel of basegraphics in the Help page ?par(). This function allows you to set (or query)the graphical parameters or options.Notice that par() takes an extensive list of arguments. In this section, wedescribe a few of the most commonly used options.The axes label styleTo change the axes label style, use the graphics option las (label style). Thischanges the orientation angle of the labels:0: The default, parallel to the axis1: Always horizontal2: Perpendicular to the axis3: Always verticalFor example, to change the axis style to have all the axes text horizontal, uselas=1 as an argument to plot:> plot(faithful, las=1)You can see what this looks like in Figure 16-7.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!