My fault. I did this in Stata 9.0 and forgot that -lcolor()-
is new here. The documentation of that change is
accessible to you at
http://www.stata.com/help.cgi?whatsnew8to9#graphics
So, for -lcolor()- read -clcolor()-. This works in 8.2:
sysuse auto
scatter mpg weight, text(41 2650 "top car")
|| scatteri 41 2100 41 2500 , clcolor(black) recast(line)
|| scatteri 41 2100 41.3 2200, clcolor(black) recast(line)
|| scatteri 41 2100 40.7 2200, clcolor(black) recast(line) legend(off)
Nick
[email protected]
Raphael Fraser
> Thank you! The example was very helpful. I had only one small problem:
> the -lcolor- option did not work.I recieved the following error
> message
>
> [option lcolor() not allowed invalid syntax]
Nick Cox
> > Here is a daft example showing one way to build
> > your own arrow as three line segments:
> >
> > sysuse auto
> >
> > scatter mpg weight, text(41 2650 "top car")
> > || scatteri 41 2100 41 2500 , lcolor(black) recast(line)
> > || scatteri 41 2100 41.3 2200, lcolor(black) recast(line)
> > || scatteri 41 2100 40.7 2200, lcolor(black)
> recast(line) legend(off)
> >
> > Neat arrows at some orientation other than vertical or horizontal
> > would require some trigonometry. The angle between barb and shaft
> > looks OK to many tastes at about 30 degrees. Stata 9 uses a
> default of
> > 28.6 degrees, better known as 0.5 radian.
> >
> > There is more on arrows in Stata 9 in a forthcoming Tip in
> > Stata Journal 5(2).
*
* 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/