var data; function preload() { data = loadTable('cars.csv', 'csv', 'header'); } function setup() { createCanvas(800,800); //count the columns print("Hello world!"); print(data.getRowCount() + ' total rows in table'); print(data.getColumnCount() + ' total columns in table'); } function draw() { //axes drawn (draw little lines on axes) line(10,10,10,800); line(10,799,800,799); for(var x = 0; x < data.getRowCount(); x++) { //scaled by number of cylinders ellipse(100 + x*5, .025 * data.getString(x, 5), 2 *data.getString(x, 2), 2 *data.getString(x, 2)); } }