课程: Data Visualization in R with ggplot2
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Annotating your visualization
- [Instructor] We also sometimes want to add annotations to our visualizations to display some additional context. These may come in the form of adding text, lines, or more complex annotations. There are three functions that we'll discuss that you can use to annotate a visualization. The annotate function in Gigi Plot allows us to add simple annotations to a visualization. These can be any shape or text element. The geom hline function adds a horizontal line, and the geom vline function adds a vertical line. Let's give them a try in our studio. We'll switch things up a little bit this time and change from the bar graph that we've been working with back to the scatterplot that we created earlier in the course. This plot shows how an institution's average SAT score varies with tuition. When I look at this chart, I notice that there's a region in the upper right corner that contains the schools that are both the most expensive and have the highest average SAT scores. They're all private…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。