Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Graph - alignment of titles


From   "Allan Reese (Cefas)" <[email protected]>
To   <[email protected]>
Subject   st: Graph - alignment of titles
Date   Tue, 18 Aug 2009 15:26:49 +0100

Here's a feature - someone may have a use for it.  (Found in Stata 10
but a consequence of the documented command.)

A scatterplot drawn with equal axes - aspect(1) - looked fine until I
added a title, which caused the Y axis to be pushed left away from the
plot area. The solution was to add "span" as a sub-option.  The reason
is that the title is written outside the plot region but left-justified
to align with its border.  With the aspect fixed, pushing the border out
made a gap.

sysuse auto
scatter mpg weight,  ti("This will be a long long  long long  long
title", span) aspect(1)
   graphregion(color(red) icolor(green)) plotregion(color(gold)) 

scatter mpg weight,  ti("This will be a long long  long long  long
title") aspect(1)
   graphregion(color(red) icolor(green)) plotregion(color(gold)) 

scatter mpg weight,  ti("This will be a long long  long long  long
title") 
   graphregion(color(red) icolor(green)) plotregion(color(gold))     

Allan

R Allan Reese
Senior statistician, Cefas
The Nothe, Weymouth DT4 8UB 

Tel: +44 (0)1305 206614 -direct
Fax: +44 (0)1305 206601 

www.cefas.co.uk 



***********************************************************************************
This email and any attachments are intended for the named recipient only.  Its unauthorised use, distribution, disclosure, storage or copying is not permitted.  If you have received it in error, please destroy all copies and notify the sender.  In messages of a non-business nature, the views and opinions expressed are the author's own and do not necessarily reflect those of the organisation from which it is sent.  All emails may be subject to monitoring.
***********************************************************************************


*
*   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/



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