# Useful Videos

## Plotting simple graphs in R

how to plot a simple linear or quadratic equation in R. We recommend using the highest playback quality (720p) for a clearer image of what to type.

Some of the code used includes the following commands:

curve( ... ) for plotting a curve using its equation.

xlab - edits the label for the x-axis.

ylab - edits the label for the y-axis.

main - Edits the title of the plot.

col - Changes the colour of the line being plotted.

lwd - Changes the width of the line being plotted.

add = TRUE - Tells R to add this new line to the last plot you did.

abline( ... ) - Draws a horizonal or vertical line (useful for drawing an axis on a graph).

grid() - draws a feint regular grid.