Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: RE: RE: Scoreplot: different colors


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: Scoreplot: different colors
Date   Fri, 18 Jun 2010 11:32:43 +0100

Another way to do it: 

sysuse auto, clear
pca trunk weight length headroom
predict score1 score2, score
separate score2, by(foreign) veryshortlabel 
sc score2? score1, mcolor(green blue) ytitle(`: var label score2')

See also 

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

Accessible to non-subscribers via 

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

Nick 
[email protected] 

Martin Weiss

sysuse auto, clear
pca trunk weight length headroom
predict score1 score2, score
tw (sc score2 score1 if foreign, mlabel(foreign)) (sc score2 score1 if
!foreign, mlabel(foreign)), legend(off) tit(score Variables (pca))

[email protected]

I need to dientify to identify different groups with different colors.
I am performing:

sysuse auto
pca trunk weight length headroom
scoreplot, component(2) mlabel(foreign) mcolor(green blue)

I can see the two different groups (domestic and foreign) but I need
them
in different colors.


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index