SetFillColor for Frames

From: Christ Tassilo (tassilo@skipper.physics.sunysb.edu)
Date: Mon Dec 06 1999 - 03:53:32 MET


Hi rooters!

The macro below is taken from the root tutorials and my output differs 
from the one posted on the web in that I cannot get the boundaries of the 
histogram to be painted in a different color than the canvas.
I suppose c1->GetFrame->SetFillColor(...) is supposed to do this, but
the whole canvas is painted with the color set by c1->setFillColor(...).
What am I doing wrong?

Tassilo


  gROOT->Reset();	
  c1 = new TCanvas("c1","A Simple Graph Example",200,10,700,500);
  
  c1->SetFillColor(4);
  c1->SetGridx();
  c1->SetGridy();
  c1->GetFrame()->SetFillColor(2);
  c1->GetFrame()->SetBorderSize(12);
  
  Float_t x[20], y[20];
  for (Int_t i=0;i<n;i++) {
    x[i] = i*0.1;
    y[i] = 10*sin(x[i]+0.2);
    printf(" i %i %f %f \n",i,x[i],y[i]);
  }
  gr = new TGraph(n,x,y);
  gr->SetFillColor(19);
  gr->SetLineColor(2);
  gr->SetLineWidth(4);
  gr->SetMarkerColor(4);
  gr->SetMarkerStyle(21);
  gr->Draw("ACP");
  
  c1->Update();
  gr->GetHistogram()->SetXTitle("X title");
  gr->GetHistogram()->SetYTitle("Y title");


-------------------------------------------------------------------------------
Tassilo Christ

State University of NY at Stony Brook		
PHENIX-Experiment at BNL

Campus:					Private:
Department of Physics and Astronomy 	Schomburg A 112 - C,
Office C116 				350 North Loop Road
					11790 Stony Brook, NY	
Telephone 516-632-9007			Telephone 516-216-5106

BNL- phone: 516 - 344 - 5455
					
"Microsoft spel chekker four sail, worx grate!"
"A world without walls and fences could live without Windows and Gates..."


And my personal favourite:
esa$ gcc -Wall -o ariane5 ariane4.c
ariane4.c: 666: warning: long float implicitly truncated to unsigned type
esa$ ariane5

:->
-------------------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:44 MET