Colour of functions and points on the graph using code in CL

Is there a way to control the colour of a point or a function on a graph using CL (i.e. in code)?

What I want to do is change the colour of a point based on whether it is in the right place or not. I can use the “when” statement and can capture the x and y coordinates but I can’t seem to control the colour of the point.

Any thoughts?

Thanks

Chris

You can calculate correctness in graph, then show the point with the right colour based on that correctness. For example: