Graphics Reference
In-Depth Information
Figure 4-13. Left: line graph with constant size and color; right: with supp mapped to colour, and
with points added
See Also
For more information about using colors, see Chapter 12 .
Changing the Appearance of Points
Problem
You want to change the appearance of the points in a line graph.
Solution
In geom_point() , set the size , shape , colour , and/or fill outside of aes() (the result is
shown in Figure 4-14 ):
ggplot(BOD, aes(x = Time, y = demand)) +
geom_line() +
geom_point(size = 4 , shape = 22 , colour = "darkred" , fill = "pink" )
Search WWH ::




Custom Search