课程: Data Visualization in R with ggplot2
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
The Grammar of Graphics
- [Narrator] The Grammar of Graphics lies at the heart of ggplot2, and it lies at the heart of how we define our data visualizations. You can think of The Grammar of Graphics as very similar to the grammar of any spoken or written language. It consists of the set of rules that we follow to make sure that we construct sentences that other people can understand. For example, The Grammar of Words says that we should create sentences that consist of subjects and predicates, and use nouns, verbs, adjectives, and adverbs for different purposes. If we tried to compose sentences without a grammar, we wouldn't be able to understand each other. The Grammar of Graphics has the four components shown in this table. First, we must have some data that we'd like to visualize. Then we use geometries to define the shapes that we'd like to use to visualize our data. This might be points for a scatterplot, lines for a line graph, or bars for a bar or column graph. Then we can modify the aesthetics of…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。