课程: Data Visualization in R with ggplot2
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Changing scales
- [Instructor] The x and y-axes are two examples of a more general concept known as a scale. Scales describe how data is mapped from the dataset onto the visualization. In the example of the bar graph, the x-axis shows categorical data, the region. Each observation in the dataset has a region value of Midwest, Northeast, South, or West, and it's assigned an x value that corresponds to that region. The y-axis, on the other hand, shows the total number of schools in each region. It is a continuous value, and each region's bar rises to the level of the total number of schools in that region. There is one additional scale on this plot. The fill color of each bar is also a scale. It maps private schools using the salmon color and public schools using the blue color. You can also have scales corresponding to other attributes of a plot, such as shape, line, color, and transparency. We can make many different changes to the scales in a plot to customize it to our needs. We do this by using a…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。