Data Visualization - GitHub Pages

Geoms

Data Visualization

Graphical Primitives

with ggplot2

with ggplot2

ggplot2 is based on the

grammar

Cheat

Sheet of graphics, the

idea that you can build every graph from the same

Basics

few components: a data

set, a set of geomsvisual

marks that represent data points, and a coordinate

system. F M A

3

+

F MA

=

2

1

0

4

1

y, alpha, color, fill,

size

x, xend, y, yend, alpha,

color, curvature, Two Variablesh +x,geom_bin2d(binwidth

= c(5,shape,

0.5))

f + angle,

geom_blank()

One Variable

a + geom_area(stat

= "bin")

linetype,

size

xmax, xmin, ymax, ymin, alpha, color, fill,

Continuous X, Continuous Y

Continuous Bivariate Distribution

x, y, alpha, Continuous

color, fill, linetype, size

b + geom_area(aes(y

= ..density..),

stat = "bin")

a ................
................

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

Google Online Preview   Download