Create Line Curves for Specified Equations in R Programming - curve() Function Last Updated : 10 Jun, 2020 Comments Improve Suggest changes Like Article Like Report curve() function in R Language is used to draw a curve for the equation specified in the argument. Syntax: curve(expression, to, from, col) Parameters: expression: To be curved to, from: range of curve plotting col: color of curve Example 1: Python3 1== # R program to create a curve # Creating curve using curve() function curve(x ^ 2 + x + 5, -4, 4, col ="green", ylab ="y") Output: Example 2: Python3 1== # R program to create a curve # Creating curve using function fun <- function(x) {x ^ 3 + 4} curve(fun, -4, 4, col ="red", ylab ="y") Output: Comment More infoAdvertise with us Next Article Create Line Curves for Specified Equations in R Programming - curve() Function N nidhi_biet Follow Improve Article Tags : R Language R-plots R Math-Function Similar Reads Adding Straight Lines to a Plot in R Programming - abline() Function abline() function in R Language is used to add one or more straight lines to a graph. The abline() function can be used to add vertical, horizontal or regression lines to plot. Syntax: abline(a=NULL, b=NULL, h=NULL, v=NULL, ...) Parameters: a, b: It specifies the intercept and the slope of the line 2 min read Addition of Lines to a Plot in R Programming - lines() Function In R, the lines() function is called to add on top of already existing plot. This is particularly helpful when you want to add more lines, such as trend lines, regression lines, or special lines, on a plot. The lines() function allows flexibility in line color, line width, and line type, with multip 3 min read Adding axis to a Plot in R programming - axis () Function axis() function in R Language is to add axis to a plot. It takes side of the plot where axis is to be drawn as argument. Syntax: axis(side, at=NULL, labels=TRUE) Parameters: side: It defines the side of the plot the axis is to be drawn on possible values such as below, left, above, and right. at: Po 2 min read Fitting Linear Models to the Data Set in R Programming - glm() Function glm() function in R Language is used to fit linear models to the dataset. Here, glm stands for a generalized linear model. Syntax: glm(formula)Parameters: formula: specified formula  Example 1:  Python3 # R program to illustrate # glm function # R growth of orange trees dataset Orange # Putting a 2 min read Plot Arrows Between Points in a Graph in R Programming - arrows() Function arrows() function in R Language is used to create arrows between the points on the graph specified. Syntax: arrows(x0, y0, x1, y1, length) Parameters: x0: represents x-coordinate of point from which to draw the arrow y0: represents y-coordinate of point from which to draw the arrow x1: represents x- 2 min read Like