Statalist


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

st: ? Limit to number of symbols for legend keys when plottingmultiple overlaid lines?


From   "Ben Dwamena" <[email protected]>
To   <[email protected]>
Subject   st: ? Limit to number of symbols for legend keys when plottingmultiple overlaid lines?
Date   Fri, 25 Jan 2008 11:29:53 -0500

Dear Statlisters,
M code below plots 18 overlaid roc graphs. However,  in the legend, all labels appear but only 16 symbols appear in the key. How can I reconcile the number of symbols with key labels. Is there a limit to the number of keyed label?

gen id =_n
local li 1
levelsof id, local(slevels)
tempvar x 
range `x' 0 1 1000
foreach s of local slevels {
local id "Study[`s']"
local note: di `id'
gen roc`s' = normal(a[`s'] + b[`s']*invnormal(`x'))
replace roc`s' = `x' if `x' == 0 | `x' == 1
local legend `"`legend' label(`li' `note')"'
local order "`order' `li++'"
}


twoway line roc* `x', aspect(1) xsc(range(0 1)) ysc(range(0 1))  ///
xla(0(.2)1, nogrid) yla(0(.2)1, nogrid angle(hor)) xti("1-Specificity", size(*0.95)) ///
yti("Sensitivity", size(*0.95)) legend(order(`order') pos(2) ///
rowgap(1) col(1) `legend') ti("Study-specific ROC Curves(Probit Model)", size(*0.75)) 

Thanks,
Ben




Ben Adarkwa Dwamena, MD

Assistant Professor of  Radiology
Division of Nuclear Medicine
Department of Radiology
University of Michigan Health Systems
B1G505 UH SPC 5028
1500 E. Medical Center Drive
Ann Arbor, MI  48109-5028


[email protected]

http://sitemaker.umich.edu/metadiagnosis



Staff Physician
D748 Nuclear Medicine Service (115), 
VA Ann Arbor Health Care System
2215 Fuller Road
Ann Arbor, MI 48105
734-845-3775 Phone
734-845-3252 Fax



**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues

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