This worksheet revisits the plotting functions for a closer look on layout and labeling. After completing this worksheet you should know how to make plots which are fine for presentations.
The following script is build on top of your script from W06-1. Please copy your script “W06-1.R”, rename the copy to “W09-1.R” and use it for the programming tasks of this worksheet.
Enough of theory…it's all about looks now!!!
Please make a scatter plot which shows the predicted vs. observed animal activity values. As you can easily see, there is much space for improvement.
First of all we want to change those nasty axis names. Let's do the scatter plot again and use the arguments “xlab” and “ylab” within the function plot() to get user defined axis titles.
Of course a title would be nice, too. The argument for that within the function plot() is “main”.
Now…let's be creative. Get some inspiration on http://www.statmethods.net/advgraphs/parameters.html and then come back to change the color of your symbols.
You can also add a legend using the function legend().
Finally, add a diagonal line, where the observed equals the predicted value.