Statalist


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

Re: st: RE: Help with superscript in graphs


From   Ricardo Ovaldia <ovaldia@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Help with superscript in graphs
Date   Thu, 10 Dec 2009 08:17:59 -0800 (PST)

Excellent. Thank you Nick.

Ricardo

Ricardo Ovaldia, MS
Statistician 
Oklahoma City, OK


--- On Thu, 12/10/09, Nick Cox <n.j.cox@durham.ac.uk> wrote:

> From: Nick Cox <n.j.cox@durham.ac.uk>
> Subject: st: RE: Help with superscript in graphs
> To: statalist@hsphsun2.harvard.edu
> Date: Thursday, December 10, 2009, 10:00 AM
> Try this. In passing, I show a more
> direct way to control format. 
> 
> sysuse auto, clear
> regress mpg price
> local r2 : di %04.3f e(r2)
> graph twoway  (scatter mpg price) (lfit mpg price) ,
> legend(off) text(35  13000 "r{superscript:2} = 
> `r2'", alignment(bottom))
> 
> Nick 
> n.j.cox@durham.ac.uk
> 
> 
> Ricardo Ovaldia, MS 
> 
> I want to include the r-square value in a graph inside the
> plot area:
> 
> When I specify the option:
> 
> text(25  12 "r{superscript:2} =  0`r2'"
> 
> I get the desired result except that the superscript is too
> far above the “râ€. How do I get the superscript to
> be closer to the “râ€
> 
> Here is an example using the auto data.
> 
> sysuse auto, clear
> regress mpg price
> local r2= round(e(r2),.0001)
> graph twoway  (scatter mpg price) (lfit mpg price) ,
> legend(off) text(35  13000 "r{superscript:2} = 
> 0`r2'")
> 
> 
> *
> *   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/
> 


      

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index