#1) Using mtcars,construct bar chart to know the frequency of CYL in the mtcars.
#2) change color in #1) input color for 1st bar = #EDB4F8, 2nd bar = #C3FAF9 and 3rd bar = #D6FAC3
#3) Add percentage label on the bar graph (hint: Making summarise data percentage and frequency value)
#4) add title for the graph as "Bar chart showing distribution of number of cylinder"
#add xaxis title as "Number of cylinder"
#add yaxis title as "Number of Cars"
#5) Center the title of the graph as in #4)
#6) remove background color for #5)
#7) change background line with dot line for #6)
#8) rescale the y-axis, made increament by 1 for #7)
#9)group mtcars dataset by "am" and "cyl", compute mean for mpg
#10) change variable name "am" in #9) as "Transmission" and change variable name "cyl" in #9) as "Cylinder"
#11) using mtcars, construct bar chart to know mean of mpg based on Cylinder
#12) using mtcars, construct horizontal bar chart to know mean of mpg based on Cylinder
#13) using mtcars, construct cluster bar chart to know mean of "mpg" based on "Cylinder", clustered by "Transmission"
#14) create simple bar chart to know the mean of mpg by Number of Cylinders in mtcars and seperate the graph by (transmission) breaks the yaxis from 0 to 30 by 3.
#15) from #14) please input some color to the graph from scale_fill_manual() (hint: color to be input: c("#F0FCA2", "#FCE9A2", "#A2F4FC"))
#16) Explore the following themes and comment on the different: #theme_bw #theme_gray #theme_linedraw #theme_light #theme_dark #theme_minimal #theme_classic #theme_void #theme_test
#17) download package ggthemes and explore the following themes and make a comparisons: # theme_tufte # theme_economist # theme_stata # theme_wsj # theme_clac # theme_hc #theme_excel #theme_fivethirtyeight #theme_foundation #theme_gdocs #theme_igray
#18) Explore the ggthemes package on :
#scale_colour_tableau - https://www.rdocumentation.org/packages/ggthemes/versions/3.5.0/topics/scale_colour_tableau "tableau20", "tableau10medium", "tableau10light", "colorblind10", "trafficlight", "purplegray12", "bluered12", "greenorange12", "cyclic"
#scale_fill_canva - https://www.rdocumentation.org/packages/ggthemes/versions/3.5.0/topics/scale_colour_canva
#scale_fill_wsj(palette = "colors6") - https://www.rdocumentation.org/packages/ggthemes/versions/3.5.0/topics/scale_colour_wsj rgby, red_green, green_black, dem_rep, color6= table(mtcars$gear)
############################################################
#1)
mtcarsgear = table(mtcars$gear)
barplot(mtcarsgear,
main = "Bar Plot for MTCars Gears",
ylab = 'Frequency Of CYL' ,
xlab = "Gear Type")

############################################################
#2)
mtcarsgear = table(mtcars$gear)
barplot(mtcarsgear,
main = "Bar Plot for MTCars Gears",
ylab = 'Frequency of CYL' ,
xlab = "Gear Type",
col = c("#EDB4F8", "#C3FAF9", "#D6FAC3"))

############################################################
#3)
mtcarsgear = table(mtcars$gear)
barplot(mtcarsgear,
main = "Bar Plot for MTCars Gears",
ylab = 'Frequency' ,
xlab = "Gear Type",
col = c("#EDB4F8", "#C3FAF9", "#D6FAC3"))

############################################################
#4)
mtcarsgear = table(mtcars$gear)
barplot(mtcarsgear,
main = "Bar chart showing distribution of number of cylinder",
ylab = 'Number of Cars' ,
xlab = "Number of cylinder",
col = c("#EDB4F8", "#C3FAF9", "#D6FAC3"))

############################################################
#5)
mtcarsgear = table(mtcars$gear)
barplot(mtcarsgear,
main = "Bar chart showing distribution of number of cylinder",
ylab = 'Number of Cars' ,
xlab = "Number of cylinder",
col = c("#EDB4F8", "#C3FAF9", "#D6FAC3"))
############################################################
#6)
mtcarsgear = table(mtcars$gear)
barplot(mtcarsgear,
main = "Bar chart showing distribution of number of cylinder",
ylab = 'Number of Cars' ,
xlab = "Number of cylinder",
col = c("#EDB4F8", "#C3FAF9", "#D6FAC3"))
############################################################
#7)
mtcarsgear = table(mtcars$gear)
barplot(mtcarsgear,
main = "Bar chart showing distribution of number of cylinder",
ylab = 'Number of Cars' ,
xlab = "Number of cylinder",
col = c("#EDB4F8", "#C3FAF9", "#D6FAC3"))
###########################################################