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
Sorting and Labelling coeffecient from different models using coefplot.Hello Stata family! My data is divided into 10 equal groups by a categorical variable called decile…
SVYSET advice multiple countries and data sourcesDear all, I have the following situation and would like to hear your advice for svyset. I have multi…
Creating PercentilesHi, I have 3,691 observations and I want to create income percentiles for them. However, whenever I…
Recode many different observations in one variable.Hi, I am analyzing municipalities in Sweden and my data consists of 290 different municipalities. In…
sensitivity estimates for median specificity from a bayesian Hierarchical summary ROC modelDear all I am working on a diagnostic test accuracy review that includes 12 studies reporting the s…
Subscribe to:
Post Comments (Atom)
0 Response to Ordering legend only in graph
Post a Comment