//Made some heavy modifications, the boring stuff is stolen void drawYLabels() { colorMode(HSB); fill(255); stroke(255); strokeWeight(2); for (float v = PLOTY1; v <= PLOTY2; v += YINTERVAL) { if (v % YINTERVAL == 0) { // If a major tick mark textAlign(RIGHT, CENTER); // Center vertically double t = basement.getTimeAvg(v, YINTERVAL); stroke((float)t*(255.0), 200, 210, 200); fill((float)t*(255.0), 200, 210, 200); strokeWeight(10); if (rendert == false) point(PLOTX1 - 10 , v,PLOTZ1); else text( timeAsString( t ) , PLOTX1 - 10, v,PLOTZ1); line(PLOTX1 - 4, v, PLOTZ1, PLOTX1, v,PLOTZ1); // Draw major tick } } colorMode(RGB); } public String timeAsString(double time_) { int h = (int)(time_ * 24); int m = (int)(( (time_ * 24)%1) * 60); if (h > 12) { h = (h - 12); } String s = String.format("%d:%02d", h,m); return s; } void drawZLabels() { fill(255); stroke(255); strokeWeight(2); for (float v = PLOTZ1; v <= PLOTZ2; v += ZINTERVAL) { if (v % ZINTERVAL == 0) { // If a major tick mark textAlign(RIGHT, CENTER); // Center vertically text( (floor( pow((v/zscale),2) ) ), PLOTX1 - 15, PLOTY1, v); line(PLOTX1 - 8, PLOTY1 , v, PLOTX1, PLOTY1, v); // Draw major tick } } } void drawXLabels() { colorMode(HSB); fill(255); stroke(255); strokeWeight(2); float t; for (float v = PLOTX1; v <= PLOTX2; v += XINTERVAL) { if (v % XINTERVAL == 0) { // If a major tick mark textAlign(RIGHT, CENTER); // Center vertically t = basement.getDeweyAvg(v, XINTERVAL); stroke(t*(255.0/1000.0), 200, 210, 200); fill(t*(255.0/1000.0), 200, 210, 200); strokeWeight(10); if (rendert == false) point(v, PLOTY1 - 15,PLOTZ1); else text( (int) t, v, PLOTY1 - 15, PLOTZ1); strokeWeight(2); { } line(v, PLOTY1 - 4, PLOTZ1, v, PLOTY1,PLOTZ1); // Draw major tick } } colorMode(RGB); }