Not show labels

Consider this example:

int xlabels()
{
  TH1F * h = new TH1F("h", "h", 0, -5.0, 5.0);
  TCanvas * c = new TCanvas;
  h ->	Draw();
  return 0;
}

In the output:

I would like the x axis labels not to be shown, just the ticks. How to achieve that?


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Hi,
use the SetLabelSize() option, to be more specific SetLabelSize(0) does what you want.

Cheers,
Stefano

1 Like

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