Hi Ed, The TAxis objects of a THStack are only created when the Paint function is called. you should: contStack.Draw(); canvas.Update(); before executing: contStack.GetXaxis()->SetTitle(myAxisTitle); Rene Brun On Fri, 6 Sep 2002, Edward Chen wrote: > Hi - I get a seg violation when I do the following: > > THStack contStack("contStack","SP4 continuum"); > thePlot = (TH1F *) ccbarFile.Get(myPlotName); > contStack.Add(thePlot); > if (myAxisTitle != "") contStack.GetXaxis()->SetTitle(myAxisTitle); > > > If I remove the SetTitle part, the crash doesn't occur. Am I doing > something wrong? Thanks. > > -Ed >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:08 MET