User Tools

Site Tools


root:setaxisrange

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
root:setaxisrange [2011/05/11 15:39] – [Y Axis of a normalized Histogram] nchiaproot:setaxisrange [2012/08/15 11:57] – added info for THStack nchiap
Line 23: Line 23:
 hist->GetYaxis()->SetRangeUser(normalizedLower*scaleY,normalizedUppe*scaleY); hist->GetYaxis()->SetRangeUser(normalizedLower*scaleY,normalizedUppe*scaleY);
 </code> </code>
 +
 +===== Y Axis of a THStack =====
 +Do not try to ''SetLimits'' or ''SetRangeUser'' of any histogram.
 +Instead use the following code:
 +<code c++>
 +THStack *hs = new THStack("hs","test stacked histograms");
 +hs->SetMinimum(0.);
 +hs->SetMaximum(10.);
 +</code>
 +
  
 ===== X Axis of TGraph ===== ===== X Axis of TGraph =====
root/setaxisrange.txt · Last modified: 2014/03/11 10:20 by nchiap