Statalist


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

st: AW: vary marker color by external variable


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: vary marker color by external variable
Date   Tue, 4 Aug 2009 22:02:14 +0200

<> 

This post may be of some help:
http://www.stata.com/statalist/archive/2009-06/msg01143.html




HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Peter Goff
Gesendet: Dienstag, 4. August 2009 21:59
An: [email protected]
Betreff: st: vary marker color by external variable

I'm looking for a way to use the color of the marker as an added  
dimension in a scatter plot. I realize I can create N plots, all with  
different colors, but I was hoping someone knew of a command to  
essentially weight (continuously) by color. I've tried to use the RGB  
mcolor(# # #) option, and tie the color to the range of my results:

gen c1 = 255 - (totl-1)*21
gen c2 = (totl-1)*21

graph twoway scatter Y X, mcolor("c1 0 c2")

I cannot, however, get stata to read "c1" as a variable as opposed to  
a class color. Any suggestions would be greatly appreciated.

Peter Trabert Goff
PhD student
Department of Leadership, Policy, and Organizations
Vanderbilt University

Peabody #514
230 Appleton Place
Nashville, TN 37203-5721
Tel. 615-415-7844
Fax. 615-322-6596
[email protected]




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


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