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
Multivariate Local Linear Polynomial Regression (lpoly)Hello, I want to perform a multivariate linear polynomial regression on STATA. I am working with el…
Psmatch2 and next steps for survival analysisHello, I have run psmatch2 on my observational dataset and would appreciate some guidance on how to…
keeping only unique values using egen concatHello, I am trying to generate an indicator called mo_all using egen and concat that records all th…
long string matchingI have 2 data sets of products 1) asicc product codes and corresponding product names 2) hs 1996 pro…
How does rforest handle missing values?Hi, I am trying to understand how the rforest command in Stata handles missing values in the indepe…
Subscribe to:
Post Comments (Atom)
0 Response to Ordering legend only in graph
Post a Comment