Session Ready
Exercise

Explicit limits

In base R graphics, axis limits are usually manipulated by explicitly specifying the limits using the xlim and ylim arguments. This also works in lattice plots.

Instructions
100 XP

The lattice package and the USMortality dataset have been pre-loaded.

  • Find a suitable value for x_limits so that the two highest rates (Heart disease and Cancer) are excluded from the plot, but none of the other rates are excluded.
  • Pass your limits to the xlim argument of dotplot() and draw the plot.

You can either programmatically find a suitable value, or use trial and error.