Cannot draw TH2D "col" with Canvas grid?


_ROOT Version:6.16
_Platform:macosx
_Compiler:clang


Hi, all:
I’d love to draw an 2D histogram TH2D with option “colz”
It seems this option cover the grid line setting by TCanvas::SetGrid.
How could I draw the Grid line again.

Try:

histo2D->Draw("COLZ");
gPad->SetGrid(1, 1);
gPad->Modified(); gPad->Update();

tried, but not works.:joy:

After having drawn the histogram with COLZ try:

gPad->RedrawAxis("g");
1 Like

problem solved. Thanks.

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