RootTalk


ROOT Discussion Forums

TH1F->Draw()

Discuss installing and running ROOT here. Please post bug reports here.

Moderator: rootdev

TH1F->Draw()

Unread postby Andrew1 » Fri Mar 02, 2012 16:14

Hi,

If I do this:

TH1F * myHist= new TH1F("myHist","myHist",100,0,100);

and then fill the histogram with stuff and then want to view the histogram for only a 0 to 50, can I give "Draw()" some argument so that it will do that? Is this discussed somewhere in the root manual?

Thanks.

Andrew
Andrew1
 
Posts: 62
Joined: Tue Sep 20, 2011 0:54

Re: TH1F->Draw()

Unread postby couet » Fri Mar 02, 2012 16:32

Code: Select all
myHist->SetAxisRange(0,50);
myHist->Draw();
User avatar
couet
 
Posts: 5220
Joined: Tue Sep 02, 2003 8:32
Location: CERN


Return to ROOT Support

Who is online

Users browsing this forum: zhangxf and 2 guests