Weight, Engine Size, and Fuel Efficiency in the mtcars Dataset

 I used the mtcars dataset to examine how vehicle weight and engine configuration affect fuel economy. The visualization displays three variables: weight (x-axis), miles per gallon (y-axis), and cylinder count shown through color-coded regression lines. The data reveals a clear pattern: heavier cars consume more fuel across all engine types, but 8-cylinder vehicles consistently perform worse than 4-cylinder cars at any given weight. The parallel slopes demonstrate that both weight and engine size independently impact efficiency.

Multivariate visualization effectively uncovered relationships that single-variable plots would miss. I applied three design principles: contrast using intuitive colors (green for efficient engines, red for inefficient ones), hierarchy through a descriptive title that presents the main finding upfront, and simplicity by removing distracting elements like horsepower encoding. The result is a clear, focused visualization that tells a complete story about how multiple factors interact to determine fuel consumption.






Comments

Popular posts from this blog

R Programming Journal - Omar Hamad

Assignment 6

Generic Functions in R