Session Ready
Exercise

The utility of common scaling and individual titles

The plots you generated in the previous exercise showed that the four Anscombe quartet datasets have very different appearances, but a careful examination of these plots reveals that they exhibit different ranges of x and y values.

The point of this exercise is to illustrate how much more clearly we can see the differences in these datasets if we plot all of them with the same x and y ranges. This exercise also illustrates the utility of improving the x- and y-axis labels and of adding informative plot titles.

Instructions
100 XP
  • Examine the range of x and y values from the previous four plots to determine a common range that covers the ranges of all four of these plots.
  • Set up a two-by-two plot array using the par() function.
  • Plot the y1 variable against the x1 variable using these common ranges, with x-axis label "x value" and y-axis label "y value", and use the main argument to add the title "First dataset".
  • Repeat for the other three Anscombe data pairs, adding the appropriate titles.