Offsetting individual graphs in a TMultiGraph

Hi Rooters,

I have a question. Is it possible to offset the x positions of TGraphs contained in a TMultiGraph, with out editing the original TGraphs. The problem arrises due to not being able to distinguis error bars from each other or see the points that are at close values on the y axis.

Thanks for your help.

Bryn

Hi,

you could draw the graphs into different, overlaid pads; see root.cern.ch/root/html/tutorials … pad.C.html Only your first graph would be drawn with an axis. For the others you change the minimum / maximum of the graph->GetHistogram()->GetYaxis() such that the graphs gets a visual offset.

Cheers, Axel.

… or you can define the frame and draw with same. That will give you margins.
To avoid errors overlay we have TGraphBentErrors: root.cern.ch/root/html/TGraphBentErrors.html

I will take a look and see what it looks like with bent errors.

I guess the other question is then, if I have a function that returns a TGraphAsymError, is it possible to access the x component(after the function has returned the TGraph), add a small number and then repot?

Bryn

They are all TGraphs as you can see on the inheritance tree here:
root.cern.ch/root/html/TGraph.html