Target Graph

Target Graph

Target Graph

The goal in creating the target graph was to reproduce the graph seen above.

Data Entry

jmen <- read.table("jmen.txt", header=TRUE)
jmen
##      Name Age  Eyes  Hair
## 1    John  32  Blue Brown
## 2     Jim  39 Green   Red
## 3   Jamal  48 Brown Blond
## 4   Johan  21  Blue Blond
## 5   Julio  50 Green Brown
## 6  Julian   9 Brown Brown
## 7  Jabril  83  Blue Black
## 8   Jamie  10 Brown   Red
## 9 Joachim  12  Blue Brown

Imitation Graph

hair_table <- table(jmen$Hair)
barplot(hair_table, col=c("Black","Yellow","Brown","Red"), main="Hair Color of Sampled JMen", xlab="Hair Colors",ylab="Number of Men", names.arg=c("Black","Blond(e)","Brown","Red"))

I was able to imitate the target graph well. The scale of the graph is slightly different, as it appears larger. I believe this is due to the sizing of .png image being slightly smaller.