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

Re: st: variable color in Stata 8 plot

From   Nick Winter <[email protected]>
To   [email protected]
Subject   Re: st: variable color in Stata 8 plot
Date   Fri, 24 Jun 2005 16:48:03 -0400

I don't know of a way to do it directly as you awnted, but you can avoid making new variables, by doing something liek:

scatter y x if z==0 , mcolor(red) || y x if z==1, mcolor(blue)

--Nick Winter

At 04:31 PM 6/24/2005, you wrote:

I know I could accomplish this by
gen y0 = y if z==0
gen y1=y if z==1
scatter y0 y1x,mcolor(red blue)
Nicholas Winter                           607.255.8819 t
Assistant Professor                       607.255.4530 f
Department of Government              [email protected] e
308 White Hall   w
Cornell University
Ithaca, NY 14853-4601

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index