Amazing technological breakthrough possible @S-Logix pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to create line graph in R?

Description

How to create line graph for the given data using R programming.

Process

Line Graphs:

   A line chart is a graph that connects a series of points by drawing line segments between them.

   R Function : plot()

   More than one line can be drawn on the same chart by using the lines() function.

Sapmle Code

#Data Visualization in Line Graph

#Read File
print(getwd())
setwd(“/home/soft13″)
print(getwd())
data<-read.csv(‘input.csv’)
print(data)

#Line Graph
plot(data$salary,type=”o”,col=”blueviolet”)

#Lines
number<-c(822,734,840,740,890,735,635,924)
lines(number,type=”l”,col=”chocolate2″)

Screenshots
create line graph in R
Data Visualization in Line Graph