Problem with option surf3z in TH2d

Dear rooters,
I want to draw TH2 with option SURF3z in a way it is similar
to a CONT4z; using gPad->SetTheta(90); gPad->SetPhi(0.005);
Than I want to draw on the contour plot an ellipse and a marker.
But this is not possible!!
What can I do to draw such objects?
I need to superimpose these two objects on the contour map!!
It does not work also if I am using option Cont4z.
Please, can somebody help me?
Ciao
Marco
I am attaching the macro with the data needed
intensity.C (5.17 KB)

Your example had a missing file.
Here is an example using a transparent pad.

Rene

{
TH2F *hpxpy = new TH2F(“hpxpy”,“py vs px”,30,-3,3,30,-3,3);
TRandom r;
for (Int_t i=0;i<10000;i++) {
hpxpy->Fill(r.Gaus(0,1),r.Gaus(0,1));
}
TCanvas *c1 = new TCanvas(“c1”);
TPad *pad1 = new TPad(“pad1”,"",0,0,1,1);
pad1->Draw();
pad1->cd();
hpxpy.DrawClone(“cont4z”);
c1->cd();
//make pad2 frame transparent
TPad *pad2 = new TPad(“pad2”,"",0,0,1,1);
pad2->SetFrameFillStyle(4000);
pad2->Draw();
pad2->cd();
hpxpy->GetXaxis()->SetLabelOffset(99);
hpxpy->GetYaxis()->SetLabelOffset(99);
hpxpy.Draw(“a”);
TEllipse *el = new TEllipse(0,0,2,1.5);
el->SetLineColor(2);
el->SetLineWidth(10);
el->Draw();
}

Dear Rene,
thanks now it works.
But there is still a problem:
if you try (from the menu) to print the canvas on a eps/ps file what
you get is the last canvas you have drawn and not the whole thing.
Since I need the whole, what can I do to print everything there is in the canvas?
Bye
marco

Marco,

Unfortunately transparent pads do not work with Postscript.
You should make a gif file and convert the file to ps

Rene

Dear Rene,
I did everything you mentioned (including printing on a Gif file)
but still one problem!
The image has a yellow line surrounding it.
How can I delete it?
I need only my contour plot in the picture anf nothing else.
Thanks for your help
Ciao
Marco

Set the canvas highlight color to the pad/canvas color,eg
gPad->SetHighLightColor(19);

or set the default value in $ROOTSYS/system.rootrc

Rene

Dear Rene,
I didn’t understand how I can disable the function which generates the pads
with a border.
I want to generate every pad without a border (SetBorderMode(0)).
is that possible? or i should manually do it for every pad I create?
Thanks
Marco

To set global options, use TStyle, eg
gStyle->SetPadBorderMode(0)

Rene