Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Sorry - wrong subject - graph axis title question


From   "Nick Winter" <[email protected]>
To   <[email protected]>
Subject   st: Sorry - wrong subject - graph axis title question
Date   Wed, 29 Jan 2003 14:10:59 -0500

Apologies for the incorrect subject line in my previous post.  To avoid
the evil WINMAIL.DAT file attachment in my Outlook, I post to Statalist
by replying to an existing message.  This time I forgot to change the
subject line.

Cheers,
Nick W.

> -----Original Message-----
> From: Nick Winter 
> Sent: Wednesday, January 29, 2003 2:08 PM
> To: [email protected]
> Subject: st: RE: -db- suggestion
> 
> 
> 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/
> 
*
*   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/



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