A macro to Draw labels on graph points

root [0] double x[3] = {1,3,5}
root [1] double y[3] = {1,5,2}
root [2] auto gr = new TGraph(3,x,y);
root [3] gr->SetMarkerStyle(20);
root [4] .x DrawGraphWithLabelsOnPoints.C(gr)

The points can be moved interactively. The labels follow.

DrawGraphWithLabelsOnPoints.C (916 Bytes)