let table; let width; let height; let margin; let intervals; let y_max; let x_max; let z_max; let y_min; let x_min; let bar_width; let interval_width_px; let tick_width; let text_size; let data_points = []; let total_violent_vals = []; let pop_vals = []; let total_property_vals = []; let data_point_scale; function preload() { table = loadTable('county_crime.csv','csv','header') } function setup() { width = 800; height = 800; margin = 100; intervals = 10; bar_width = 20; interval_width_px = (height - 2*margin)/10; tick_width = 3; text_size = 5; data_point_scale = 10; createCanvas(width,height); background(245,255,250); //setting plot area setPlotArea(); //load data points with values from .csv loadDataPointsForScatterPlot(); //plot y-axis ticks plotYTicks(); //plot x-axis ticks plotXTicks(); plotXLabel(); plotYLabel(); } function draw() { push(); translate(margin,margin); for(var m=0;m