Like this:
twoway (scatteri 0.730 0.596, msymbol(Dh) mcolor(green)) ///
(scatteri 0.730 0.596 0.90 0.90, msymbol(i) connect(l) lwidth(vvvthin) lpattern(dot) lcolor(gs7)) ///
(scatteri 0.656 0.789, msymbol(Oh) mcolor(blue)) ///
(scatteri 0.656 0.789 0.90 0.90, msymbol(i) connect(l) lwidth(vvvthin) lpattern(dot) lcolor(gs7)) ///
(scatteri 0.90 0.90, msymbol(Sh) mcolor(red)) ///
(scatteri 0.836 0.539, msymbol(Th) mcolor(magenta)) ///
(scatteri 0.836 0.539 0.90 0.90, msymbol(i) connect(l) lwidth(vvvthin) lpattern(dot) lcolor(gs7)) ///
(scatteri 0.689 0.692, msymbol(X) mcolor(cyan)) ///
(scatteri 0.689 0.692 0.90 0.90, msymbol(i) connect(l) lwidth(vvvthin) lpattern(dot) lcolor(gs7) ///
title("ROC plot of test performances") xlabel(0.0(0.1)1.0) ylabel(0.0(0.1)1.0) xscale(revers) xsize(4) ysize(4) ///
ytitle("sensitivity") xtitle("specificity") aspectratio(1) scheme(s1mono) plotregion(margin(zero)) graphregion(margin(zero))
///
legend(order(1 3 5 6 8) label(1 "Test 1") label(3 "Test 2") label(5 "Test 3") label(6 "Test 4") label(8 "Test 5") rows (2)
size(small)))
Explanation: You made lwidth() lpattern() and lcolor() suboptions of connect() but they should not be suboptions.
Tom
-----------------------------------
Thomas J. Steichen
[email protected]
-----------------------------------
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of mail
Sent: Monday, March 26, 2007 7:10 PM
To: [email protected]
Subject: st: Identical style of overlaid connecting lines
I have run in to a problem with the connect option in the twoway scatter command
When I overlay plots I cannot control how the connecting lines are drawn.
The script below illustrates the problem:
twoway (scatteri 0.730 0.596, msymbol(Dh) mcolor(green)) ///
(scatteri 0.730 0.596 0.90 0.90, msymbol(i) connect(l lwidth(vvvthin) lpattern(dot) lcolor(gs7))) ///
(scatteri 0.656 0.789, msymbol(Oh) mcolor(blue)) ///
(scatteri 0.656 0.789 0.90 0.90, msymbol(i) connect(l lwidth(vvvthin) lpattern(dot) lcolor(gs7))) ///
(scatteri 0.90 0.90, msymbol(Sh) mcolor(red)) ///
(scatteri 0.836 0.539, msymbol(Th) mcolor(magenta)) ///
(scatteri 0.836 0.539 0.90 0.90, msymbol(i) connect(l lwidth(vvvthin) lpattern(dot) lcolor(gs7))) ///
(scatteri 0.689 0.692, msymbol(X) mcolor(cyan)) ///
(scatteri 0.689 0.692 0.90 0.90, msymbol(i) connect(l lwidth(vvvthin) lpattern(dot) lcolor(gs7)) ///
title("ROC plot of test performances") xlabel(0.0(0.1)1.0) ylabel(0.0(0.1)1.0) xscale(revers) xsize(4) ysize(4) ///
ytitle("sensitivity") xtitle("specificity") aspectratio(1) scheme(s1mono) plotregion(margin(zero)) graphregion(margin(zero))
///
legend(order(1 3 5 6 8) label(1 "Test 1") label(3 "Test 2") label(5 "Test 3") label(6 "Test 4") label(8 "Test 5") rows (2)
size(small)))
The connecting lines are not drawn as identical thin, dotted, greyscale lines as I would like. Instead, STATA overrules the connect
specifications and draws connecting lines
with different styles.
How do I tell STATA to draw identical connecting lines as I have specified them?
Bo Rud
*
* 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/
-----------------------------------------
CONFIDENTIALITY NOTE: This e-mail message, including any
attachment(s), contains information that may be confidential,
protected by the attorney-client or other legal privileges, and/or
proprietary non-public information. If you are not an intended
recipient of this message or an authorized assistant to an intended
recipient, please notify the sender by replying to this message and
then delete it from your system. Use, dissemination, distribution,
or reproduction of this message and/or any of its attachments (if
any) by unintended recipients is not authorized and may be
unlawful.
*
* 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/