Hi Michael, I think you have to draw the multigraph once, before calling GetAxis(). It should work as for a TGraph, for which the axis is created after that you draw the graph. Cheers, Federico On Sat, 1 Mar 2003, Michael T. Gericke wrote: > > Hi ROOTers, > > I am using the TMultiGraph Class in the following way: > > TMultiGraph *mg = new TMultiGraph(); > mg->SetTitle("Lock-In Amplifier Technique Signals"); > mg->GetXaxis()->SetTitle("ms"); > mg->Add(gr1); > mg->Add(gr2); > mg->Add(gr3); > mg->Draw("ALP"); > > > When I run my file on the root command line, I get the > following error: > > Error: illegal pointer to class object GetXaxis() 0x0 138 > FILE:Rot_Src_Scope_Out.C LINE:107 > > I know that this refers to the line "mg->GetXaxis()->SetTitle("bla")", > because if I remove it the error doesn't come up. > > Does anyone know how to set the axis titles for a TMultiGraph? > > Thanks, > > Michael Gericke > > -- __________________________________________________ Federico Roncarolo federico.roncarolo@cern.ch alchemist@infinito.it CERN SL/BI 865 1-A27 Tel: +41.(0)22.76.75611 Work +41.(0)79.6982190 GSM +33.(0)4.50.40.82.67 Home __________________________________________________
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:09 MET