User Tools

Site Tools


root:setaxisrange

This is an old revision of the document!


Set Display Range of Axis

histogram->GetYaxis()->SetRangeUser(lower,upper);

X Axis of TGraph

If you have a TGraph, SetRangeUser will not work for the x axis. It will not complain but also not do anything. Or not the thing you want.

You have to use SetLimits(), like:

TGraph* myGraph = new TGraph();
...
myGraph->SetLimits(lower,upper);
root/setaxisrange.1289315327.txt.gz · Last modified: 2010/11/09 16:08 by nchiap