Stephen Bailey wrote: > > Hi. > > How do I put X and Y axis labels on a TGraph? I tried > > gr->GetXaxis()->SetLabel("dE/dx cut"); > gr->Draw("AC"); > > but no axis label appeared. > > Also, when I plot a new graph to a prexisting canvas, the > axes numbers come out all garbled. If I do a c1->Clear() > first, then the TGraph plots fine. > Stephen, Use SetTitle not Setlabel. See an example in $ROOTSYS/tutorials/graph.C Set the title after gr->Draw. TGraph::Draw does not clear the pad by default. Rene Brun
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:37 MET