You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oldest system, more intuitive. Start off with a plot function, and add on features one by one. Can use annotations to add/modify plot (such as text, lines, points, and axis). Convenient but can't go back once started.
```{r}
library(datasets)
data(cars)
with(cars, plot(speed,dist))
```
#Lattice System & Plot
Plots are created with a single function call (xyplot, bwplot, etc.) - most useful for conditioning types of plots.
```{r}
library(lattice)
state <- data.frame(state.x77, region= state.region)
xyplot(Life.Exp ~ Income | region, data=state, layout= c(4,1))
```
#ggplot2 System
Requires ggplot package. Splits the difference between base plot syste and lattice systems. Automatically arranges spacing, text, titles - but still customizable.