EE BIOL C177/C234
aes()geom_*() functionsaes()sizeInside
aes()= map a variable from your dataOutside
aes()= set a fixed value for all points
| Aesthetic | Description | Example |
|---|---|---|
x, y
|
Position |
aes(x = bill_length_mm)
|
color
|
Color |
aes(color = species)
|
shape
|
Point shape |
aes(shape = island)
|
size
|
Point size |
aes(size = body_mass_g)
|
alpha
|
Transparency |
alpha = 0.5
|
Fix the aesthetic mapping error:
Order matters β last layer is on top!
Defined in ggplot() β apply to all layers
Defined in geom_*() β apply to that layer only
ggplot()geom_*()geom_*()You can even use different data per layer:
Grammar of Graphics in Detail