Grafica Library, changing colour of specific points


#1

I want to plot the graph of reading of gyroscope data vs Time. I am using grafica library. I am adding the point in the points in the loop and want to change the color of specific points when certain condition is detected while plotting the graph. the code my plot_graph() is called from the draw function. But it changes the color of complete graph.
Please help. Please suggest
gy: has array of gyroscope data and time has timestamp

void draw(){
while (iteration<max_count)
{
plot_graph();
iteration++;
}
}
plot_graph()
{

    points2.add(time[iteration],gy[iteration]);
    plot1.setPoints(points2);  
    plot1.beginDraw();
    plot1.drawBackground();
    plot1.drawXAxis();
    plot1.drawYAxis();
    plot1.drawTopAxis();
    plot1.drawRightAxis();
    plot1.drawTitle();
    plot1.drawGridLines(GPlot.BOTH);
    if (status==a)
    {
    plot1.setPointColor(color(0, 200, 0));
    }
    else if (status==b)
    {
    plot1.setPointColor(color(200,0, 42));
    }
    plot1.getMainLayer().drawPoints();
    plot1.activatePointLabels();
    plot1.activatePanning();
    plot1.activateZooming(1.1, CENTER, CENTER);   
    plot1.activateZooming(1.5);
    plot1.endDraw();
}

#2

yes, i think that lib not has that multi color feature???

can you show a picture how it looks now

and a description on the criteria of color change

to give a idea if a other way would be more easy

see here i make my own graph,
with a few code lines, possibly less i would need using any lib.


#3

Here is a previous post from the developer on the old forum discussing how to set individual point colors in grafica. Two different approaches are discussed in detail with example code.