I am trying to order the legend with the better outcome group up top in the legend and the worse outcome at the bottom. I am unable to finagle to get the right options. Tried fiddling with plot and legend(order) but I can't seem to get it right. Needed "Missense" up top in the legend and then the "Other" below it.
local v mis2
foreach var of local v{
qui sts graph ///
, by(`v') ///
plot1(lc(navy) lp(solid)) ///
plot2(lc(dkorange) lp(-)) ///
plotregion(margin(medium) icolor(white) color(white) ) ///
graphregion(margin(vsmall) icolor(white) color(white) ) ///
title("24-month (OS) analysis", size(medium)) ///
xtitle("Time since tMN/AML diagnosis (months)", size(small)) ///
xlabel(0(5)25, labs(small)) ylabel(0(0.25)1, angle(0) labs(small)) ///
ytitle("Proportion surviving", size(small) margin(medium)) ///
legend(order(1 "Other TP53 mutations (n = )" 2 "Missense P53 mutations (n= )") ///
col(1) size(small) symxsize(*0.5) margin(small) rowg(*0.1) ring(0) pos(2)) ///
risktable(,order(1 "Other" 2 "Missense") size(vsmall) title(,size(small))) ///
text(0.28 8 "p<0.04", place(sw) size(small)) ///
name(km_OS24, replace)Array
Related Posts with Ordering legend only in graph
How to get Durbin-Watson stat in GMM regressions?Dear statalist, I am running GMM regressions with robust HAC matrix and standard errors and I would…
help in generating count variableI am working on World Value Survey dataset. It consists of 5 waves and multiple countries in each wa…
Reproducing "estat trendplots" linear-trends modelHello Statalist community, I am doing an analysis using a diff in diff methodology. As I use Stata …
Import multiple CSV filesHi I am trying to import multiple CSV files in a foreach loop. I saved the filenames in the local n…
How to drop the mtitle row in esttab ?In esttab, when I did not specify mtitle, STATA will automatically create a row for title similar to…
Subscribe to:
Post Comments (Atom)
0 Response to Ordering legend only in graph
Post a Comment