17. Ribbon Plot
geom_ribbon()은 error bar plot의 라인 버전이라고 생각하시면 됩니다.
xxxxxxxxxx
ggplot(STOCK) +
geom_ribbon(aes(x= Date, ymin = log(Low) - 0.5, ymax = log(High) + 0.5),fill = 'royalblue' , alpha = 0.2) +
theme_classic()
ggplot(STOCK) +
geom_ribbon(aes(x= Date, ymin = log(Low) - 0.5, ymax = log(High) + 0.5),fill = 'royalblue' , alpha = 0.2) +
geom_point(aes(x= Date, y = log(Low) - 0.5), col = '#8A8585', alpha = 0.8) +
geom_point(aes(x= Date, y = log(High) + 0.5), col = '#8A8585', alpha = 0.8) +
geom_line(aes(x = Date, y = log(Open)),group =1 , col = '#C2DAEF' , linetype = 'dashed', size = 0.1) +
geom_point(aes(x = Date, y = log(Open)),col = 'red', alpha = 0.4) +
theme_classic() +
ylab("") + xlab("")
댓글
댓글 쓰기