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

st: Superimposing graphs


From   "Branko Milanovic" <[email protected]>
To   <[email protected]>
Subject   st: Superimposing graphs
Date   Thu, 10 Feb 2005 14:49:06 -0500

I am trying to draw two very similar graphs in one figure. The graph for
year X should show dots for that year and fit a regression (qfit or lfit
I don't care). The graph for year Y should do exactly the same thing and
fit the regression for that year across that year's dots. Seems easy?

But while each of the graphs works fine separately, and while one of
them works with both the dots and the line (as it should), the other
shows only the dots or gives the message

1| invalid name

So I cannot get both of them with dots and fits on the same figure. Any
idea why?  The text is given below.

Thanks a lot,

Branko Milanovic



 twoway (scatter capture lngdpppp if year==1988 & group==1 || qfit
capture lngdpppp if year==1988 & group==1)
(scatter capture lngdpppp if year==1998 & group==1 || qfit capture
lngdpppp if year==1998 & group==1)

Ps. "capture" is variable name.



Carnegie Endowment for International Peace
1779 Massachusetts Avenue NW
Washington DC 20036
Email: [email protected] or [email protected]
tel: 202-473-6968 (leave a message)
www.worldbank.org/research/inequality
http://econpapers.hhs.se/RAS/pmi44.htm
http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=149002


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index