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

st: stata8 legend on overlaid twoway graphs


From   "Chris Wallace" <Chris.Wallace@lshtm.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: stata8 legend on overlaid twoway graphs
Date   Thu, 27 Mar 2003 14:35:19 +0000

Using the following, much simplified, example, I plot an estimate and 95% CI using overlaid scatter and rcap twoway graphs.  I can tell stata8 to put the red line in the legend, or the red dot, with the appropriate title (see below).  I would like to combine these, and have a red line with a red dot in the middle (with just the one title).  Is this possible?

input loc est lci uci
1   1.0 0.5 1.5
2   1.2 0.8 1.3
end
twoway (scatter est loc , mcolor(red)) (rcap lci uci loc , blcolor(red)), legend(order(1 "est and 95%CI"))

Note.  Under stata7, I could get something similar:

graph7 est lci uci loc, s(o..) pen(222) c(.II) key1(s(o) connect(l) p(2) "est and 95% CI")

but cannot work out how to do the same under stata8.  Thanks for all suggestions, C.



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