# Computing with Data

elgeish
201.7K views

## Line Plots

A line plot is a graph displaying a relation between x and y as a line in a Cartesian coordinate system. The relation may correspond to an abstract mathematical function or to relation present between two variables in a specific dataset:

# Using the curve function
sinc = function(x) {
return(sin(pi * x) / (pi * x))
}
curve(sinc, -7, +7, main = "Using curve")
# Using plot
s = sort.int(mpg$cty, index.return = T) # S$x holds the sorted values of city mpg
# S\$ix holds the indices of the sorted values of city mpg
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX