plot() function is defined as as generic function for plotting in R Language. It can be used to create basic graphs of different type .
plot(x, y, type)
x and y: coordinates of points to plot
type: the type of graph to create
Returns: different type of plots
In above example type=“l” stands for lines graph, type=“h” stands for ‘histogram’ like vertical lines.
Here, in above example type=“b” stands for both that means points are connected by a line
type=“s”indicates stair steps
type=“p” for points (by default).