Questions

Find the mtcars data in R. This is the dataset that you will use to create your graphics. Use that data to draw by hand graphics for the next 4 questions.

  1. Draw a pie chart showing the proportion of cars from the mtcars data set that have different carb values.

install.packages(imager)

library(imager)
## Warning: package 'imager' was built under R version 3.3.3
## Loading required package: plyr
## Loading required package: magrittr
## 
## Attaching package: 'imager'
## The following object is masked from 'package:magrittr':
## 
##     add
## The following object is masked from 'package:plyr':
## 
##     liply
## The following objects are masked from 'package:stats':
## 
##     convolve, spectrum
## The following object is masked from 'package:graphics':
## 
##     frame
## The following object is masked from 'package:base':
## 
##     save.image
image1<-load.image("C:/Users/bkulkarni/Desktop/ANLY 512 - 50/Carbs_Pie.jpg")
plot(image1, axes = FALSE)

  1. Draw a bar graph, that shows the number of each gear type in mtcars.
image2<-load.image("C:/Users/bkulkarni/Desktop/ANLY 512 - 50/Carbs_Pie.jpg")
plot(image2, axes = FALSE)

  1. Next show a stacked bar graph of the number of each gear type and how they are further divded out by cyl.
image3<-load.image("C:/Users/bkulkarni/Desktop/ANLY 512 - 50/Gear_Cyl_StackedColumn.jpg")
plot(image3, axes = FALSE)

  1. Draw a scatter plot showing the relationship between wt and mpg.
image4<-load.image("C:/Users/bkulkarni/Desktop/ANLY 512 - 50/Wt_MPG_ScatterPlot.jpg")
plot(image4, axes = FALSE)

  1. Design a visualization of your choice using the data.
image5<-load.image("C:/Users/bkulkarni/Desktop/ANLY 512 - 50/Transmission_Column.jpg")
plot(image5, axes = FALSE)