[ROOT] latex for Y axis leads to segmentation violation

From: Brett Viren (bv@bnl.gov)
Date: Wed Sep 04 2002 - 04:39:37 MEST


Hi,

Should the following work?

//-------------------------------
// test.C
TCanvas* canvas = 0;
TGraph* graph = 0;
TH1F* hist = 0;

void test(void)
{
     canvas = new TCanvas("test","test",500,500);
     canvas->cd();

     double x[2] = { 0.0, 1.0 };
     double y[2] = { 0.0, 1.0 };
     graph = new TGraph(2,x,y);
     graph->Draw("AC");

     hist = graph->GetHistogram();
     hist->SetXTitle("#alpha");
     hist->SetYTitle("#beta");
     graph->Draw();
}
// end test.C
//-------------------------------


I find that unless I uncoment the "SetYTitle("#beta")" line, or don't
use ROOT "latex", I get:


-------------------------------------
shell> root test.C
  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   3.03/08  2 September 2002   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

FreeType Engine v1.x used to render TrueType fonts.
Compiled for linux with thread support.

CINT/ROOT C/C++ Interpreter version 5.15.54, Aug 18 2002
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] 
Processing test.C...
root [1] 
 *** Break *** segmentation violation
-------------------------------------


Debian x86, ROOT from cvs as of yesterday, GCC 2.95.4.


-Brett.



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:06 MET