Statalist The Stata Listserver


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

st: Identical style of overlaid connecting lines


From   mail <[email protected]>
To   [email protected]
Subject   st: Identical style of overlaid connecting lines
Date   Tue, 27 Mar 2007 01:09:57 +0200

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/



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