Plotting Flashcards
plot(x)
plot of the values of x (on the y-axis) ordered on the x-axis
plot(x, y)
bivariate plot of x (on the x-axis) and y (on the y-axis)
hist(x)
histogram of the frequencies of x
barplot(x)
histogram of the values of x; use horiz=FALSE for horizontal
bars
dotchart(x)
if x is a data frame, plots a Cleveland dot plot (stacked plots
line-by-line and column-by-column)
pie(x)
circular pie-chart
boxplot(x)
“box-and-whiskers” plot
sunflowerplot(x, y)
id. than plot() but the points with similar coor-
dinates are drawn as flowers which petal number represents the num-
ber of points
stripplot(x)
plot of the values of x on a line (an alternative to
boxplot() for small sample sizes)
coplot(x ̃y | z)
bivariate plot of x and y for each value or interval of
values of z
interaction.plot (f1, f2, y)
if f1 and f2 are factors, plots the
means of y (on the y-axis) with respect to the values of f1 (on the x-axis) and of f2 (different curves); the option fun allows to choose the summary statistic of y (by default fun=mean)
matplot(x,y)
bivariate plot of the first column of x vs. the first one of y, the second one of x vs. the second one of y, etc.
fourfoldplot(x)
visualizes, with quarters of circles, the association be- tween two dichotomous variables for different populations (x must be an array with dim=c(2, 2, k), or a matrix with dim=c(2, 2) if k = 1)
assocplot(x)
Cohen–Friendly graph showing the deviations from inde- pendence of rows and columns in a two dimensional contingency ta- ble
mosaicplot(x)
‘mosaic’ graph of the residuals from a log-linear regres- sion of a contingency table