Session Ready
Exercise

Changing plotting characters revisited

You have seen in a previous exercise how to use different plotting symbols to distinguish between groups.

The goal of this exercise is to use the USMortality dataset to recreate the dot plot of Rate by Cause conditioned on Status and grouped by Sex, where the plotting symbol for males has pch = 1 (open circle) and the symbol for females has pch = 3 (plus sign). This time, the different plotting symbols should be reflected in the legend as well.

Instructions
100 XP

The USMortality data has been pre-loaded, and sample code to create a dot plot of Rate by Cause conditioned on Status and grouped by Sex is given.

Fill in suitable values of par.settings.

  • This argument should call simpleTheme().
  • simpleTheme() should have a pch argument, which should be a numeric vector of length two.
  • The data points for females should be indicated by a plus symbol (pch = 3).
  • Those for males should be indicated by an open circle (pch = 1).