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

st: RE: legends for function graphs


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: legends for function graphs
Date   Sun, 21 Aug 2005 06:47:46 -0500

How about this:

twoway function y=cos(x^2 -x), xline(0.5, lwidth(thick) lcolor(red) ///
lpattern(dash)) xlabel(0(0.1)1) ///
clwidth(thin) clcolor(blue) clpattern(shortdash_dot) ///
 legend(on)  yvarlab("dash_dot = point estimate")  ///
|| function y = 1, lc(none) yvarlab("dash line = f(x)") 


Scott



> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Richard Hiscock
> Sent: Sunday, August 21, 2005 5:28 AM
> To: [email protected]
> Subject: st: legends for function graphs
> 
> I am trying to create a legend for graphs of functions. Illustrated for
> example by  y=f(x)
> 
> twoway function y=(x), xline(0.5, lwidth(thick) lcolor(red)
> lpattern(dash)) xlabel(0(0.1)1)
> clwidth(thin) clcolor(blue) clpattern(shortdash_dot)
> 
> as an example I wish to add a legend indicating the function - dash line
> = f(x) & the label for the other line - dash_dot = point estimate
> 
> I have tried the legend(label 1"") options this seems to need variables
> in data set & does not label functions or xlines/ylines.
> 
> Any help would be appreciated
> Thanks Richard Hiscock
> 
> 
> *
> *   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