Re: [ROOT] TGraph(Errors) title behaviour

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Mar 07 2003 - 22:30:04 MET


Hi Bram,

TPad::DrawFrame returns a pointer to the histogram used to draw the 
frame. See below how to modify your code

Rene Brun

On Fri, 7 Mar 2003, Bram 
Wijngaarden wrote:

> 
> Hi all,
> 
> I'm trying to plot a title above my TGraphErrors using
> TGraphErrors* graph = [...]
> graph->GetHistogram()->SetTitle("My Title");
> 
> It shows some eratic behaviour - if I call
> graph->Draw("ap");
> i.e., draw markers and axes, I do get the title, but if I draw a frame
> first and then call
  TH1 *frame = gPad->DrawFrame(0,0,30,1);  //<===========
  frame->SetTitle("my title"); //<===============

> graph->Draw("p");
> it draws the graph but not the title.
> 
> Does anyone know how I can get my title up there but keep my custom frame?
> I'm using root version 3.05/02.
> 
> Cheers,
> Bram
> 
> -
> D.A. Wijngaarden	Meijhorst 6422
> AiO KUN-EHEF		6537 LE Nijmegen
> Experiment: D0		The Netherlands
> Work phone: +31 24 365 2822
> Fax: +31 24 365 2191
> "Fuimus" - Robert the Bruce
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET