Ggplot2 - CSC 640: Advanced Software Engineering

ggplot2

CSC 640: Advanced Software Engineering

James Walden

Northern Kentucky University

James Walden (NKU)

ggplot2

1 / 45

Topics

1 Topics 2 Grammar of Graphics 3 Distributions (One Variable) 4 Relationships (Multiple Variables) 5 Appearance and Extensions 6 References

James Walden (NKU)

ggplot2

2 / 45

What is the Grammar of Graphics?

Grammar of Graphics

A set of rules for composing plots using a small set of components.

James Walden (NKU)

ggplot2

3 / 45

Grammar of Graphics Components

1. Data that you want to visualize.

2. Aesthetic Mappings map variables in data to visual concepts (position, color, shape, etc.)

3. Geometric Objects to represent the data (points, lines, polygons.)

4. Statistical Transformations transform data (bins, counts.)

5. Scales control mapping from data to aesthetic attributes (one scale is required for each aesthetic attribute used.)

6. Coordinate system that describes how data is mapped to the plane of the graphic.

7. Facets which break the data into subsets and determine how to display the subsets.

8. Theme which controls aesthetic details like font and background color.

James Walden (NKU)

ggplot2

4 / 45

Why ggplot2?

1. Systematic approach using grammar of graphics. 2. Can make all standard and unique 2-d data visualizations. 3. Highly flexible and easy to customize. 4. Many third-party extensions and themes exist. 5. Large user base and extensive documentation.

James Walden (NKU)

ggplot2

5 / 45

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download