Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Controlling alignment of left axis in -graph combine-d graphs


From   "David Elliott" <[email protected]>
To   [email protected]
Subject   st: Controlling alignment of left axis in -graph combine-d graphs
Date   Tue, 30 Jan 2007 23:02:57 -0400

I'm plotting, in two separate graphs with the same xscale, a graph of
percentiles with no xlabels and a graph of counts which are
subsequently combined in a col(1) orientation with the second plot
providing xlabels for both.  Both graphs have legends on the right and
I can get the right border of the plots to line up by specifying equal
textwidth()s in the legend properties of the two graphs.  I am then
left with trying to align the left side of the plotting areas.  The
difficulty arises from the axis labels being of different numbers of
digits, e.g. the range on plot1 may be (0,50) and on plot 2 (0,2500).
I can't predict beforehand what the relative number widths are going
to be and since the graphs are being generated in a loop, there can be
no provision for hand-tuning.  I have hopped around the graphics
manual (does anyone else find it confusing?) and found titlegap()
which can be used to tune the spacing between axis title and labels,
but that is unsatisfactory for an automated process.




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index