Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Overlaying Scatter Plots


From   "Scott Merryman" <smerryman@kc.rr.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Overlaying Scatter Plots
Date   Sun, 10 Sep 2006 15:53:37 -0500

Can you reproduce this with an available data set?

Are your -scatter- statements on two different lines? As you have it written
the second graph will overwrite the first graph.

Perhaps it should be something like this:

 sysuse auto, clear
 scatter mpg gear if foreign == 0, mcolor(red) || /// 
 scatter mpg gear if foreign == 1, mcolor(blue)


Scott


> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Joe Trubisz
> Sent: Sunday, September 10, 2006 2:54 PM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: Overlaying Scatter Plots
> 
> Hi...
> 
> OK...It might be simple, but it's driving me nuts!
> 
> I have a simple set of data
> 
> id residue x y
> 
> and I want to do a scatter plot, where I am overlaying each scatter
> plot as in:
> 
> scatter y x if residue == "A", msize(vtiny) mcolor(red) ||
> scatter y x if residue == "T", msize(vtiny) mcolor(blue)
> 
> If I do a "help scatter", it seems to indicate that these will
> overlay each other.
> But in my case, I'm getting 2-separate graphs, one next to each other.
> 
> What am I missing?
> 
> TIA,
> Joe
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index