im trying to draw a grid for my graph, seen below. I know I can use ROOT.gPad.SetGrid(1, 1) but it doesnt let me decide on the grid location. I would like a line (vertical and horizontal) to go through every blue dot.
I guess you saw that my macro draws the grid you are asking for ? right ? running only my macro should be fine. Now it could be that the way you combined it with your code is wrong. So yes I would need a macro reproducing what you get to help you further. (note that I am soon on holidays, better solve this today).
I saw you modified your first post with some example. Vectors x,y,a and b are missing though .
It does not need to know. SetGrid sets a flag at the canvas level. When the histogram is drawn this flag is checked … as simple as that …