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]

Re: st: Scoreplot: different colors


From   Ulrich Kohler <kohler@wzb.eu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Scoreplot: different colors
Date   Fri, 18 Jun 2010 13:19:23 +0200

Am Freitag, den 18.06.2010, 12:16 +0200 schrieb mmolina@uniroma3.it:
> Dear Statalist,
> 
> 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.
> Could you please help me?


Martin and Nick have answered the question. Allow me to add that this
plot is a special case of a biplot:

. sysuse auto
. biplot trunk weight length headroom, std alpha(1)

The following command brings you quite close to the self made
soltution:

. biplot trunk weight length headroom, ///
   rowover(for) alpha(1) std nocol xnegate ynegate

Many regards
Uli







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