[ROOT] Bugs when plotting graphs?

From: Matt Palmer (palmer@hep.phy.cam.ac.uk)
Date: Thu Feb 21 2002 - 13:36:06 MET


Hi, 
I think I've found 2 bugs.  The script at the end demonstrates them.
The first bug is that using LaTeX in a y axis title seems to cause the text 
to be rotated.  This appears only on the screen.  Saving the canvas as a 
Postscript file gives text which is straight.
Secondly, when saving the generated canvas to a Postscript file, the TF1 is 
not drawn.  This appears to be related to the fill style - for some fill 
styles it works, for some it doesn't.

Thanks
Matt

void Test() {
  double y[] = {0.0, 1.0, 2.0, 3.0, 4.0};
  double x[] = {10.0,11.0,12.0,13.0,14.0};

  TMultiGraph* m = new TMultiGraph("test", "Test");
  TGraph* g1 = new TGraph(5, x, y);
  m->Add(g1);

  TCanvas* c = (TCanvas*) gROOT->FindObject("c1");
  if (!c) c = new TCanvas("c1", "Test");
  c->Clear();
  m->SetMinimum(0);
  m->Draw("alp");
  m->GetYaxis()->SetTitle("#Lambda lambda");	//Text is rotated
  //m->GetYaxis()->SetTitle("Lambda");		//Text is straight

  TF1* f = new TF1("a", "x/10", 10, 20);
  f->SetFillStyle(3013);	//f not seen when saving as a ps file
  //f->SetFillStyle(1001);	//f will be seen when saved as ps 
  f->SetFillColor(3);
  f->Draw("fcsame");
}



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