data<-read.csv("C:/Users/roopam/Desktop/YOU CANalytics R Visualization.csv") #change the directory name# x <- data$Age.Group y1 <- data$Number.of.Loans y2 <- data$Bad.Rate par(mar=c(5,5,2,5)+.1) barplot(y1,col="grey",border=0,names.arg=x,angle=45,xlab="Age Groups",ylab="Number of Loans",cex.lab=1.7, cex.main=1.7, cex.sub=1.7,cex.axis=1.2,cex.names=1.2) par(new=TRUE) plot(y2,type="l",col="Orange",lwd=5,xlab="",ylab="",xaxt="n",yaxt="n") axis(4,cex.axis=1.2) mtext("Bad Rate",side=4,line=3,cex=1.7) legend("topright",col=c("orange"),lty=1,lwd=5,legend=c("Bad Rate"),cex=1.25)