Graphical procedures
Table of Contents
par()
reference
Reset par()
howto
Just call dev.off()
plot()
reference
plot(x, y)
plot(xy)
plot(x)
plot(f)
plot(f, y)
plot(df)
plot(~ expr)
plot(y ~ expr)
qqnorm(x)
qqline(x)
qqplot(x, y)
hist(x)
hist(x, nclass=n)
hist(x, breaks=b, …)
dotchart(x, …)
image(x, y, z, …)
contour(x, y, z, …)
persp(x, y, z, …)
hist()
reference
Default
Density
abline()
reference
curve()
reference
Use layout()
to organize plots howto
- This is like the
grid-template-areas
property of CSS. - Each number stands for the next N th plot.
- Each number in the argument matrix corresponds to the visual position of the plots.
layout(matrix(c(1, 1, 1,
2, 3, 4,
2, 3, 4), nr=3, byrow=T))
hist(rnorm(25), col="VioletRed")
hist(rnorm(25), col="VioletRed")
hist(rnorm(25), col="VioletRed")
hist(rnorm(25), col="VioletRed")