User Tools

Site Tools


root:setxaxisrangetgraph

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

root:setxaxisrangetgraph [2010/11/06 15:06] (current)
decianm created
Line 1: Line 1:
 +====== Set the range of the x axis in a TGraph ======
 +===== Problem =====
 +If you have a TGraph, SetRangeUser will not work for the x axis.
 +<code C++>
 +TGraph* myGraph = new TGraph();
 +...
 +myGraph->​SetRangeUser(lower,​upper);​
 +</​code>​
 +will not complain but also not do anything. Or not the thing you want.
 +
 +You have to use SetLimits(),​ like:
 +<code C++>
 +TGraph* myGraph = new TGraph();
 +...
 +myGraph->​SetLimits(lower,​upper);​
 +</​code>​
 +
 +
  
root/setxaxisrangetgraph.txt ยท Last modified: 2010/11/06 15:06 by decianm