On Sun, May 3, 2009 at 11:03 AM, Jacob Wegelin <[email protected]> wrote:
> Is there a way to specify the horizontal location of the -xtitle- in
> relation to the scale of the x-axis?
>
You can use the -margin()- option within -xtitle()-:
sysuse auto, clear
qui summarize mpg, detail
local thisQ1=r(p25)
local thisQ3=r(p75)
local xtitlelocation= (`thisQ1'+`thisQ3')/2
di `xtitlelocation'
sort mpg
kdensity mpg , gen(dnsMPGx dnsMPGy) nograph
set scheme lean1
twoway (line dnsMPGy dnsMPGx), xlabel(none, nogrid noticks labsize(large)) ///
xmlabel(`thisQ1' `thisQ3', grid glpattern(dash) labsize(medium)) ///
plotregion(margin(zero)) ///
title("") ytitle("") ylabel(none) xtitle(Miles Per Gallon, margin(l=-43))
Scott
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/