6. Data Visualization and Analysis.

Sahil Sahani
0


 6. Data Visualization and Analysis.


 6A)Write an R program to demonstrate various ways of performing Graphical Anaylsis.[Hint:bar chart, pie chart]

CODE:


# Write an R program to demonstrate various ways of
# performing Graphical analysis.
# (bar chart,pie chart)

# create data for chart
A=c(17,2,8,13,1,22)
B=c("Jan","Feb","Mar","Apr","May","Jun")

# plot the bar chart
barplot(A,name.arg=B,xlab="Month",
        ylab="Articles",col="blue",
        main="Articles-chart")
# create a pie chart
X=c(23,56,20,63)
labels=c("Mumbai","Navi Mumbai","Pune","Nashik")
# plot the chart with title and rainbow color pallet
pie(X,labels,main="City pie chart",
    col=rainbow(length(x)))
    

OUTPUT :




Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.
Post a Comment (0)