-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-viz-2
34 lines (24 loc) · 803 Bytes
/
test-viz-2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
let percents; // percentages not vuln
let r = 20; // set red value
let g = 20; // set green value
let b = 30; // set blue value
let y = 10; // start at the top
function preload() {
// load data from file
// temps = loadTable("data.csv", "csv", "header");
percents = loadTable("LOG4SHELL.csv", "csv", "header");
}
function setup() {
createCanvas(800, 800);
background(10);
for (let row = 0; row < percents.getRowCount(); row++) {
// print PercentNotVuln values in console just for fun lol
print(percents.getString(row,1))
// draw some lines for each percent
// stroke(percents.getString(row,1))
stroke(r + r * 0.1 * percents.getString(row, 1), g, b * percents.getString(row, 0));
strokeWeight(10)
line(0, y, width, y);
y+=11
}
}