Line attributes in lego1 & lego2

[quote]Please note the “Draw bottom face” part of TPainter3dAlgorithms::LegoCartesian() should be further upgraded when THStack will correctly handle TH2 with negative data (see viewtopic.php?f=3&t=16569)[/quote]To make myself clear, the patch above perfectly works with negative valued TH2 (see below).
The problem is with THStack only (THStack & TH2 with negative values).
So the patch above deserves to be commited on its own (see the fixes it allows in the “before & after patch” archives in the previous post).

[code]{
gStyle->SetHistMinimumZero(kTRUE) ;
gStyle->SetTitleFontSize(0.10) ;

TH2D * histo = new TH2D (“histo”,“histo”,3,-3.,3.,3,-3.,3.) ;
histo->SetBinContent(1,1, 1.) ;
histo->SetBinContent(1,2, 3.) ;
histo->SetBinContent(1,3, 4.) ;
histo->SetBinContent(2,1,-6.) ;
histo->SetBinContent(2,2, 0.) ;
histo->SetBinContent(2,3, 9.) ;
histo->SetBinContent(3,1,-8.) ;
histo->SetBinContent(3,2, 2.) ;
histo->SetBinContent(3,3,-5.) ;
histo->SetMinimum(-10.) ;
histo->SetMaximum( 10.) ;
histo->SetStats(kFALSE) ;
histo->SetFillColor(kRed) ;
histo->SetLineColor(kAzure+1) ;
histo->SetLineStyle(2) ;
histo->SetLineWidth(2) ;

THStack * hstack = new THStack (“hstack”,“hstack”) ;
hstack->Add(histo) ;
hstack->SetMinimum(-10.) ;
hstack->SetMaximum( 10.) ;

TCanvas * canvas = new TCanvas (“canvas”) ;
canvas->Divide(2,3) ;
canvas->cd(1) ; gPad->SetTheta( 30.) ; gPad->SetPhi( 30.) ; histo->SetTitle(“lego, topview” ) ; histo->DrawClone(“lego ,fb”) ;
canvas->cd(3) ; gPad->SetTheta( 30.) ; gPad->SetPhi( 30.) ; histo->SetTitle(“lego1, topview” ) ; histo->DrawClone(“lego1,fb”) ;
canvas->cd(5) ; gPad->SetTheta( 30.) ; gPad->SetPhi( 30.) ; histo->SetTitle(“lego2, topview” ) ; histo->DrawClone(“lego2,fb”) ;
canvas->cd(2) ; gPad->SetTheta(-30.) ; gPad->SetPhi(-30.) ; histo->SetTitle(“lego, bottomview” ) ; histo->DrawClone(“lego ,fb”) ;
canvas->cd(4) ; gPad->SetTheta(-30.) ; gPad->SetPhi(-30.) ; histo->SetTitle(“lego1, bottomview”) ; histo->DrawClone(“lego1,fb”) ;
canvas->cd(6) ; gPad->SetTheta(-30.) ; gPad->SetPhi(-30.) ; histo->SetTitle(“lego2, bottomview”) ; histo->DrawClone(“lego2,fb”) ;
}
[/code]
Cheers,
Z