Basic Graphs and Plots

UA-60924200-1



> boxplot(fixed.acidity ~ quality, data= RED.Wine.14MARCH ,

main="A.6.1- Compare Fixed.acidity with Quality",

col.main="Blue",

ylab="Values of Fixed Acidity",

xlab="Quality Scores Range - MIN=3 and MAX =8",

cex.lab=1.5,

col="red",

notch=FALSE,

pch=8,

cex=.50,

las=1)


>


 > attach(RED.Wine.14MARCH)

> summary(fixed.acidity)

   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.

   4.60    7.10    7.90    8.32    9.20   15.90

> VAR1 <- fixed.acidity

h<-hist(VAR1,breaks=72,col="yellow",

xlab=" Fixed.Acidity",main="Histogram of Fixed.Acidity - with a Normal Distribution Curve and Box ")

 ### - Defined two more Variables - VAR1fit & yfit - ###

VAR1fit<-seq(min(VAR1), max(VAR1), length=40)

yfit<-dnorm(VAR1fit, mean=mean(VAR1), sd=sd(VAR1))

yfit <- yfit*diff(h$mids[1:2])*length(VAR1)

lines(VAR1fit, yfit, col="red", lwd=2)

box()


>