A pie chart showing the proportion of cars from the mtcars data set that have different carb values. From the diagram it is clear that most cars have 2 and 4 number of carb. To create the pie-chart we added up the frequency of each carb, coverted it into percentages and then drew the chart to depict the results.
A bar graph, that shows the number of each gear type in mtcars. The bar graph shows that most cars (15) have 3 gears and the least cars (5) have got 5 gears. Again, to illustrate this we added the frequencies for the number of gears and plotted the same on the graph.
Astacked bar graph of the number of each gear type and how they are further divded out by cyl. This is an interesting graph as it dives deep into the grapgh we just studied. It also tells us the proportion of cars within a certain group (for eg no of gears equals 3) how many culinders are present in that group. To create this graph we counted the number of cars within each group for different cylinders.
A scatter plot showing the relationship between wt and mpg. Here we try plot different combinations of ‘wt’ and ‘mpg’ on a graph. We can see that ‘wt’ is inversely related to ‘mpg’ of a car, which is quite intuitive, for the higher the weight of a car lower would be its mpg.
Design a visualization of your choice using the data. Lastly, I have created a bar graph that disects the data and tells us how many cars have Manual transmission vs. Automatic transmission. In our dataset ‘mtcars’ there are 19 Manual cars vs 13 Automatic cars.