[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: RE: Drawing an arrow from textbox to point [Stata 8]
Like Raphael, I also obtained an the invalid option error (on lcolor). I then took out the lcolor & recast was flagged as a syntax error. I tried this both with version statements 8.2 & 9.0 & obtained the same results both times. In the past I have labored with hyphens, greater-than & less-than symbols to try to create "arrows". This approach worked ok but was somewhat unsatisfactory -- but not so bad so as to tempt me to bring my data over to DeltaGraph. I see Nick Winter has pointed out pcarrow in Stata 9 & I look forward to familiarizing myself with that.
>Here is a daft example showing one way to build
>your own arrow as three line segments:
>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).
>> Possible, but much easier in Stata 9.
>> In Stata 8, you would need to create
>> the elements of an arrow as line segments using
>> calls to various parts of -twoway-. At least,
>> that's the only way I know.
Eric G. Wruck
2535 Sherwood Road
Columbus, OH 43209
* For searches and help try: