Statalist


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

Re: st: Twoway Plot - Change Symbol


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Twoway Plot - Change Symbol
Date   Fri, 07 Aug 2009 13:40:42 -0500

twoway
(rspike urr lrr id)
(scatter rr id if _n != 11, ms(.))
(scatter rr id in 11, ms(x))
 , xlabel(1/11, valuelabel  angle(45)) ///
         xtitle("", size(*0.8)) ytitle("Odds Ratio") title("")
 legend(off) yline(1.34)

Alternatively,

separate rr, by(_n != 11)
twoway
(rspike urr lrr id)
(scatter rr? id, ms(. x)

etc.

See for general discussion

SJ-5-4 gr0023 . . . . Stata tip 27: Classifying data points on scatter plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox Q4/05 SJ 5(4):604--606 (no commands)
        tips for using separate, gray-scale gradation, and text
        characters as class symbols to classify data points on
        a scatter plot

http://www.stata-journal.com/sjpdf.html?articlenum=gr0023

Nick

[email protected] wrote:
Is there any way to change the symbol for the 11th observation to an "x" instead of a dot?

gen id = _n
labmask id, val(names)
twoway (rspike urr lrr id) (scatter rr id), xlabel(1/11, valuelabel angle(45)) /// xtitle("", size(*0.8)) ytitle("Odds Ratio") title("") legend(off) yline(1.34)

names           str18  %18s
rr              float  %9.0g
lrr             float  %9.0g
urr             float  %9.0g

Stata 9

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