Exercise

Adjusting figure options, optimizing them for mobile devices.

You might have already noticed it: The dot plot you produced in the last chapter still needs some tweaks. There doesn't seem to be enough space between the arrows, and the last label (Netherlands) doesn't even show. Also, you want the image to fit the aspect ratio of a mobile device better, so you're going to change this with another set of chunk options.

Remember to separate your chunk options by commas to prevent your session from crashing.

Instructions

100 XP
  • Adjust the options in the last R code chunk (on line 83), specifying an image height of 8 inches and width of 4.5 inches.
  • In addition, add a fig.align option (still in line 83) so that the image is always displayed in the center of the RMarkdown report.