Professional Documents
Culture Documents
Prog 7 Graphs and Charts PDF
Prog 7 Graphs and Charts PDF
AIM:
To plot Data in the form of dot plots, histogram, box plots, 3D plots and scatter plots.
ALGORITHM:
SOURCE CODE:
(i) DOT PLOTS
# Dot chart of a single numeric vector
dotchart(mtcars$mpg, labels = row.names(mtcars),cex = 0.9, xlab = "mpg")
(ii) HISTOGRAM
# Creating data for the graph.
v <- c(12,24,16,38,21,13,55,17,39,10,60)
(iv) 3D PLOTS
# To illustrate simple right circular cone
cone <- function(x, y){
sqrt(x ^ 2 + y ^ 2)
}
# prepare variables.
x <- y <- seq(-1, 1, length = 30)
z <- outer(x, y, cone)
OUTPUT:
DOT PLOTS
HISTOGRAM
BOX PLOT
3D PLOT
SCATTER PLOT
RESULT:
Thus the program is executed and the output is verified successfully.