Consider the -graph- command below, which is closely based on the
example on page 6 of [G]. The difference is that I'm specifying a
ytitle() for the second y-axis, said title is "Diff.". If I just
specify "ytitle( "Diff." axis(2) )", then the title is centered on the
entire y-axis. I want it moved down; to do this I included just(left),
and fiddled with the width() option until it was sitting where I wanted.
Am I missing some cool option that will make this easier? I'm
imagining something like:
ytitle( "Diff." , just(center) at(10) )
which would place the title relative to the location of the value "10"
on the scale?
Cheers,
Nick Winter
*-------------------------------------------------
sysuse uslifeexp, clear
gen diff = le_wm - le_bm
graph twoway (line le_wm year, yaxis(1 2) xaxis(1 2) ) ///
(line le_bm year) ///
(line diff year) ///
(lfit diff year) ///
, ytitle( "Diff." , width(40) axis(2) size(small) just(left) ) ///
xtitle( "", axis(2) ) ///
xlabel( 1918, axis(2) ) ///
ylabel(0(5)20, axis(2) gmin angle(horizontal) ) ///
ylabel( 0 20(10)80, gmax angle(horizontal) ) ///
ytitle( "Life expectancy at birth (years)" ) ///
title( "White and black life expectancy" ) ///
subtitle( "USA, 1900-1999") ///
legend( order(1 2) label(1 "White males") label(2 "Black males") )
*------------------------------------------------
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/