Set color palette for TH3D BOX2 Draw Option

Hi everyone,

I have a TH3D object being drawn using the “BOX2” option and I need to add a color palette to indicate the scale, something “similar” to what we get using “COLZ”. I added the Z option but the palette doesn’t show up. Does anyone know how to do it?

The following is a working example:

Double_t px, py, pz;
TH3D *hd3 = new TH3D("hd3","hd3",10,0.,1.,10,0,1,5,.0,1.);

for (Int_t i = 0; i < 50000; i++) {

  px = gRandom->Gaus(0.5,0.2);
  py = gRandom->Gaus(0.5,0.2);
  pz = (px + py)/2.;
  hd3->Fill(px, py, pz);


//hd3->Draw("BOX2 Z"); // Z

[EDIT] ROOT Version: 6-10-02

Thank you,

All the best,

Yes the Z option is not implemented … I need to look at this.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

Now implemented. Thanks