// iterate through all the graphs
for (GraphData graph : graphs.values()) {
pg.beginShape();
pg.stroke(graph.color);
for (int i=0; i<graph.data.length; ++ i) {
pg.curveVertex(i, (float )graph.data[i]);
}
pg.endShape();
}
pg.popMatrix();
// do the 'clipping' (copy the offline graphics port into the applet's graphics port)