change/control number of labels in y axis

From: <nguler_at_jlab.org>
Date: Sun, 1 Feb 2009 17:07:42 -0500


Hello,
I am trying to find how to control number of labels shown in the y axis. The reason I want to do that is: I draw multiple pads on a canvas, and I want the axis labels to be large enough for readability. When I make them big, the label numbers touch and merge into each other because there are too many labels shown. How can I remove some of the labels? In a canvas, I draw a frame for each pad and determine the label size as below.

        TH1 *frame1 = gPad->DrawFrame(amin,bmin,amax,bmax);
        frame1->SetTitle("title");
        frame1->GetXaxis()->SetLabelSize(0.13);
        frame1->GetYaxis()->SetLabelSize(0.13);

Is there a better way to determine the label size so that root can decide what labels to put on the axis to make them nicely spread and not merge into each other when they are big.

And next question is how can I center the global title in each pad?

Thank you very much for your helps.

Received on Sun Feb 01 2009 - 23:07:53 CET

This archive was generated by hypermail 2.2.0 : Mon Feb 02 2009 - 05:50:02 CET