Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: RE: RE: Scoreplot: different colors


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
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 
n.j.cox@durham.ac.uk 

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))

mmolina@uniroma3.it

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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index