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

Re: st: RE: Problems with graphing in Stata 8

From   Donald Spady <[email protected]>
To   [email protected]
Subject   Re: st: RE: Problems with graphing in Stata 8
Date   Mon, 23 Feb 2004 11:05:04 -0700

It works. Seems a rather roundabout way to do this, having to create new variables, but it works.
Many thanks
Don Spady

At 10:44 AM 2/23/2004, you wrote:

Some recent threads have touched on this

>From Stata's point of view both graphs are
graphs of -HbL- versus -HbH-. -sex- is merely
the criterion you used to select points and
it doesn't feature in the graph. Why should
it? Both -if- conditions are upstream filters
determining what gets passed to the graph-drawing

What you did can be tweaked to get what you
want, but for similar problems I favour this
kind of approach (and indeed -separate- was
written largely for this purpose):

separate HbL, by(sex)
scatter HbL? HbH , legend(order(1 "male" 2 "female"))

[email protected]

Donald Spady
> when I plot twoway (scatter HbL HbH if sex==1) (scatter HbL HbH if
> sex==2)  I expect to get an overlaid plot with corresponding
> HbL & HbH
> having one symbol if sex==1 and another symbol if sex == 2.  I get
> different symbols, but in the legend box I get a blue diamond
> signifying
> HbL and a brown diamond signifying HbL.  That's right, both
> signify HbL
> and neither one signifies sex, which I expected.  What is
> going on?  What
> am I doing (or interpreting) wrong?

*   For searches and help try:
Donald Spady

Department of Pediatrics
2C3.92 WMC, University of Alberta
Edmonton, Alberta, Canada
T6G 2R7


Nature has no reset button.

* For searches and help try:

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