Home | News | Documentation | Download

Changing x-axis of TGraph

Hi I am wondering how I can modify my code to make the x-axis go to 20 instead of ten. here is my macro:

To go outside the existing data points (or bins), use SetLimits; to ‘zoom in’ within the limits, use SetRangeUser (for axis values) or SetRange (for bin numbers); in all cases, first you get the axis. For your example:

  gt->GetXaxis()->SetLimits(1, 20);