12.5 Identity Scales

Identity scales — such as scale_colour_identity() and scale_shape_identity() — are used when your data is already scaled such that the data and aesthetic spaces are the same. The code below shows an example where the identity scale is useful. luv_colours contains the locations of all R’s built-in colours in the LUV colour space (the space that HCL is based on).

##          L             u         v           col
## 1 9341.570 -3.370649e-12    0.0000         white
## 2 9100.962 -4.749170e+02 -635.3502     aliceblue
## 3 8809.518  1.008865e+03 1668.0042  antiquewhite
## 4 8935.225  1.065698e+03 1674.5948 antiquewhite1
## 5 8452.499  1.014911e+03 1609.5923 antiquewhite2
## 6 7498.378  9.029892e+02 1401.7026 antiquewhite3