Drawing histograms close together

From: Ann-Cecilie Larsen <a.c.larsen_at_fys.uio.no>
Date: Fri, 16 Feb 2007 13:32:21 +0100


Dear Rooters,

I am trying to draw three histograms very close together in the vertical direction. In my script, I use:

	c1->Divide(1,3);
	c1->cd(1);
	h1->SetLabelOffset(1.0,"x");
	c1_1->SetBottomMargin(0.001);	
	h1->Draw();

	c1->cd(2);
	h2->SetLabelOffset(1.0,"x");
	c1_2->SetTopMargin(0.0);
	c1_2->SetBottomMargin(0.0);
	h2->Draw();

	c1->cd(3);
	h3->SetLabelOffset(0.005,"x");
	c1_3->SetTopMargin(0.0);
	h3->Draw();

But the result is not very nice, the x axis of pad 1 (and 2) is sort of cut off, so only the ticks are visible. Also, the histograms are not placed near eachother, but still have some white space between them.
How can I draw them nicely together?

Thanks in advance,

Cecilie



Ann-Cecilie Larsen
Oslo Cyclotron Laboratory (http://ocl.uio.no/) Department of Physics, University of Oslo P.O.Box 1048 Blindern
N-0316 Oslo, Norway
Phone: +47 22 85 64 63 Fax: +47 22 85 64 22 E-mail: a.c.larsen_at_fys.uio.no
Received on Fri Feb 16 2007 - 13:32:33 CET

This archive was generated by hypermail 2.2.0 : Fri Feb 16 2007 - 17:50:01 CET