Graphics in R Flashcards

1
Q

This is often conceptually simpler and allows plotting to mirror the thought process.

A

Base Graphics

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

This combines the concepts from both base and lattice graphics but uses an independent implementation.

A

ggplot2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In base graphics, we can see the history of a data by using what function?

A

hist

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

We use this function to make the data more appealing

A

colors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In plotting data, what function do we need to use?

A

plot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the syntax of plot?

A

plot(x = <x>, y = <y>)</y></x>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

This code is used as a plotting symbol

A

pch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

the line width, specified as an integer multiple

A

lwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

the plotting color,Specified as a number, string, or hex code.

A

col

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

character string for the x-axis.

A

xlab

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

character string for the y-axis.

A

ylab

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

This code is used for the line type (default as solid line).

A

lty

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

This function is used to specify global graphics parameters that affects all plots in an R session.

A

par

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Number of plots per row (plots are filled row-wise)

A

mfrow

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Number of plots per row(plots are filled column-wise)

A

mfcol

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The background color

A

bg

17
Q

The outer margin size

A

oma

18
Q

The margin size

A

mar

19
Q

the orientation of the axis labels on the plot

A

las

20
Q

This function is similar to plot but with many built-in features.

A

qplot

21
Q

This plot is for complex customization

A

ggplot

22
Q

A great way to display categorical variables or discrete quantitative variables.

A

Bar chart

23
Q

Components of a ggplot

A

Data frame, aesthetic mappings, geoms, facets, stats, scales, and coordinate system.

24
Q

For conditional plots

A

facets

25
Q

statistical transformation like binning, quantiles, smoothing

A

stats

26
Q

what scale an aesthetic map uses?

A

scales

27
Q

How data are mapped to color, size, etc.

A

Aesthetic mappings

28
Q

Three layers on how plots are built.

A

Plot the data, overlay summary, metadata and annotation

29
Q

This function is used in constructing aesthetic mappings.

A

aes

30
Q

All ggplot2 plots begin with a call to ggplot(), supplying default data and
aesthethic mappings, specified by aes(). You then add layers, scales, coords and
facets with +.

A

Plot basics

31
Q

plot title

A

main

32
Q

number of breakpoints or can be a vector of breakpoints

A

breaks

33
Q

Character vector specifying _____ to use. Defaults to ”point” if x and y
are specified, and ”histogram” if only x is specified. It accepts ”point”, ”line”,
”smooth”, ”boxplot”.

A

geom