{
TH1 *h1 = new TH1F("h1", "h1", 6, 0, 180);
h1->GetXaxis()->SetNdivisions(-506);

h1->Draw();

TGaxis *ax = new TGaxis(0., 1., 180., 1., 0., 180., 506, "-");
//TGaxis *ax = new TGaxis(0., 1., 180., 1., 0., 180., -506, "-");
//                        this '-' makes ROOT hang ---^
ax->Draw();

}

