2d graph of signals of arduino

Hello, i don’t know what’s wrong this not mark an error, but the second layer no draw. can you check please.

import processing.serial.Serial;
import grafica.*;
import java.util.Random;

public GPlot plot2 ;

static final int PORT_INDEX = 0, BAUDS = 9600;
int i=0; 
int[] vals = {};
//float[] vals = {};

GPointsArray points1a = new GPointsArray(500);

void setup() {
  //vals=new int[6];
  size(850, 660);
  noLoop();
  final String[] ports = Serial.list();
  printArray(ports);
  new Serial(this, ports[PORT_INDEX], BAUDS).bufferUntil(ENTER);
  


  plot2 = new GPlot(this);
  plot2.setPos(5, 5);
  plot2.setDim(550, 550);
  plot2.getTitle().setText("Posicion");
  plot2.getXAxis().getAxisLabel().setText("X");
  plot2.getYAxis().getAxisLabel().setText("Y");
  plot2.addLayer("layer 2", points1a);
  plot2.getLayer("layer 2").setLineColor(color(150, 150, 255));
}

void draw() {
  println(vals);

  // Draw the second plot  
  plot2.beginDraw();
  plot2.drawBackground();
  plot2.drawBox();
  plot2.drawXAxis();
  plot2.drawYAxis();
  plot2.drawTitle();
  plot2.drawGridLines(GPlot.BOTH);
  plot2.drawLines();

  // plot2.drawPoints(star);

  if (vals.length == 6) {
    plot2.addPoint(i, vals[0]);
    points1a.add(i, vals[1]*2);
  }
  plot2.endDraw();
}

void serialEvent(final Serial s) {
  vals = int(splitTokens(s.readString()));
  //vals = float(splitTokens(s.readString()));
  i++;

  redraw = true;
}

i check the serial and is ok