Hi,
I encounter a problem when I try to draw a line on a TH2D histogram which is drawn with option CONT4. The coordinate system of 2D histogram is weird if the CONT4 option is chosen. The following code is an example of my problem.
{
//This is a working code, draw with option CONT
TH2D *h2 = new TH2D("h2","h2",40,-4,4,40,-4,4);
h2->FillRandom("gaus",40000);
h2->Draw("CONT");
TLine *l = new TLine(-3,-3,3,3);
l->Draw();
}
If I choose CONT, the coordinate system works as I expected. However,
{
//This is what I want to do but doesn't work. Draw with option CONT4
TH2D *h2 = new TH2D("h2","h2",40,-4,4,40,-4,4);
h2->FillRandom("gaus",40000);
h2->Draw("CONT4");
TLine *l = new TLine(-3,-3,3,3);
l->Draw();
}
if I choose CONT4, I can’t get the line I want.
My root version is 5.34/05.
What is the reason for this? Could anyone help me to solve the problem?
Thanks a lot.