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

Re: st: RE: Drawing an arrow from textbox to point [Stata 8]


From   "Eric G. Wruck" <[email protected]>
To   [email protected]
Subject   Re: st: RE: Drawing an arrow from textbox to point [Stata 8]
Date   Wed, 18 May 2005 11:12:24 -0400

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.

Best wishes,

Eric



>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).
>
>Nick
>[email protected]
>
>Nick Cox
> 
>> 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.
> 
>Raphael Fraser
> 



-- 

===================================================

       Eric G. Wruck
       Econalytics
       2535 Sherwood Road
       Columbus, OH  43209

       ph:      614.231.5034
       cell:    614.330.8846
       eFax:    614.573.6639
       eMail:   [email protected]
       website: http://www.econalytics.com

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