public void addStateMarker(int state, double time) {
        plot.addDomainMarker(new ValueMarker(time, Color.BLUE, new BasicStroke((float) 2.5)));
        switch(state) {
            case 2:
                XYTextAnnotation text = new XYTextAnnotation("Armed", time, 500);
                text.setFont(new Font("SansSerif", Font.PLAIN, 9));
                plot.addAnnotation(text);
                break;
            case 3:
                XYTextAnnotation text2 = new XYTextAnnotation("Profile", time, 510);
                text2.setFont(new Font("SansSerif", Font.PLAIN, 9));
                plot.addAnnotation(text2);
                break;
            case 4:
                XYTextAnnotation text3 = new XYTextAnnotation("Ramp", time, 520);
                text3.setFont(new Font("SansSerif", Font.PLAIN, 9));
                plot.addAnnotation(text3);
                break;
            case 5:
                XYTextAnnotation text4 = new XYTextAnnotation("Constant", time, 530);
                text4.setFont(new Font("SansSerif", Font.PLAIN, 9));
                plot.addAnnotation(text4);
                break;
            case 6:
                XYTextAnnotation text5 = new XYTextAnnotation("Recovery", time, 540);
                text5.setFont(new Font("SansSerif", Font.PLAIN, 9));
                plot.addAnnotation(text5);
                break;
            case 7:
                XYTextAnnotation text6 = new XYTextAnnotation("Retrieve", time, 550);
                text6.setFont(new Font("SansSerif", Font.PLAIN, 9));
                plot.addAnnotation(text6);
                break;
        }
    }