background colour to a function

From: Roger Mason <rmason_at_esd.mun.ca>
Date: Tue, 13 Jun 2006 16:55:44 -0230


Hello,

I'm making a plot of a 2D function for which the preferred background colour is white. The enclosed macro plots the function but the background colour always appears as 42 (which is not, in this case, the answer to everything).

I'm using 5.11/02, updated via cvs about 2 weeks ago.

Thanks for pointing out what I'm doing wrong.

Roger

{

gROOT->Reset();

// Create a new canvas.
contour = new TCanvas("contour","Contour Plot",200,10,700,500); contour->SetFillColor(10);
gPad->SetFillColor(10);

TF2 *f2 = new TF2("f2","sin(x)*sin(y)/(x+y)",0,5,0,5); f2->SetFillColor(10);
f2->Draw();

contour->Modified();
contour->Update();

} Received on Tue Jun 13 2006 - 21:25:59 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:59 MET