Monday, April 20, 2009

ROOT: how to set TGraph Xaxis range.

It seems that I cannot set the x-axis range of TGraph by

graph->GetXaxis()->SetRangeUser(0,1);

. I have to use

graph->GetXaxis()->SetLimits(0,1);

to do this task. But the former way is working for y-axis.

2 comments:

Unknown said...

Have a look at the "Zooming a Graph" subsection of the "Graphs" section of the User's Guide.

It's not pretty but it works. (Hey, maybe that should be the official ROOT slogan? ;-)

yaklibber924 said...

Hello! I simply wish to give a huge thumbs up for the great information you will have right here on this post. I will be coming back to your weblog for more soon. casino slots

Locations of visitors to this page