# Load plyr so we can use ddply() to create the example data set
library(plyr)
library(tidyverse)
ggplot(BOD, aes(x=Time, y=demand)) +
geom_line() +
geom_point(size=4, shape=22, colour="darkred", fill="pink")
设置线型尺寸和改变点颜色和填充后的效果:
ggplot(BOD, aes(x=Time, y=demand)) +
geom_line(size=1, shape=22) +
geom_point(size=4, shape=22, colour="cyan", fill="white")
改变边框和填充颜色
ggplot(BOD, aes(x=Time, y=demand)) +
geom_line(size=1, shape=22) +
geom_point(size=4, shape=22, colour="violet", fill="brown")
改变线型颜色和点填充与边框颜色
ggplot(BOD, aes(x=Time, y=demand)) +
geom_line(size=1, shape=22,color='cyan') +
geom_point(size=4, shape=22, colour="brown", fill="violet")
参考文献:Practical Receipes for Visualizing Data----R Graphics Cookbook —Winston Chang O’REILLY