Exercise

All about attributes: color, shape, size and alpha

This time you'll use these arguments to set attributes of the plot, not map variables onto aesthetics.

You can specify colors in R using hex codes: a hash followed by two hexadecimal numbers each for red, green, and blue ("#RRGGBB"). Hexadecimal is base-16 counting. You have 0 to 9, and A representing 10 up to F representing 15. Pairs of hexadecimal numbers give you a range from 0 to 255. "#000000" is "black" (no color), "#FFFFFF" means "white", and `"#00FFFF" is cyan (mixed green and blue).

A hexadecimal color variable, my_blue has been defined for you.

Instructions 1/2

undefined XP
  • 1

    Set the point color to my_blue and the alpha to 0.6.

  • 2
    • Change the color mapping to a fill mapping. That is, fcyl should be mapped onto fill.
    • Set the color of the points to my_blue, point size to 10 and the point shape to 1.