Assignment Details & Objectives:

Using ggplot2 in R studio, I used the following code to then create the following visualization:


Write-Up Questions & Discussion:

For this assignment, I used the mtcars dataset to explore multivariate relationships using a scatter plot created in ggplot2. I chose the built-in mtcars dataset because it contains multiple numerical and categorical variables that are ideal for multivariate analysis. It includes features like weight, horsepower, displacement, and cylinder count, which are all related and allow for meaningful comparisons in a single visualization. I visualized the relationship between weight and miles per gallon while incorporating additional variables through color and size. Specifically, cylinder count was represented by color and displacement by size, allowing multiple variables to be analyzed within a single visualization.
From the graph, I observed a strong negative relationship between weight and mpg, where heavier cars consistently have lower fuel efficiency. Additionally, cars with more cylinders (shown in blue) tend to cluster toward higher weights and lower mpg values, while 4-cylinder cars are generally lighter and more fuel efficient. The size encoding also shows that cars with larger displacement tend to appear in the lower mpg range, reinforcing the idea that multiple engine-related variables are interconnected.
Using color and size as visual encodings made it possible to represent several variables without overcrowding the plot. This aligns with Few’s design principles, particularly the emphasis on clarity and maintaining a strong visual correspondence between data and representation. The use of a simple color scheme, consistent scaling, and minimal background (theme_minimal) helped keep the focus on the data rather than unnecessary visual elements. However, this assignment also showed that multivariate visualizations can become complex quickly, so it is important to balance detail with readability.
Overall, this visualization made it easier to identify relationships between multiple variables at once, highlighting patterns that would not be as clear in a simple two-variable analysis.
Leave a Reply