🌍 Public
Viewing a saved revision (read-only)
19e542a34b0b4614b6b845e3249a433e
Histogram for Assignment 3
This visualization displays a histogram of average city miles per gallon (mpg) for various car makes and models from 2009 to 2012, with bar heights representing the count of vehicles at each mpg value. Built with p5.js, the sketch loads a CSV file containing mpg and count data, then renders the bars using the `rect()` function, scaling values via a custom `scale()` helper. The code draws grid lines, axis labels, and annotated data values directly on the canvas, with a title and rotated y-axis label for clarity.
AI-generated description