Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Combining graphs as is without resizing.
From
"Seed, Paul" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: Combining graphs as is without resizing.
Date
Thu, 11 Jul 2013 19:44:13 +0000
Dear Statalist ,
I have two graphs (aspect ratio 1 for each),
generated as below. I have taken time over the
size & position of all the labels, and I like
the way they look.
I wish to combine them in a single column
into one graph, aspect ratio 2, without changing
anything about either graph. Is there a way to do it in Stata?
-graph combine- automatically resizes everything.
I would like a -graph combine, asis- option.
I should say, I am using version 11.2, and I fear the answer will be
"upgrade to version 13". But can anyone make it work in version 13?
Many thanks.
******************************
**** Start of Stata code *****
#delim ;
rocgold outcome pred1 pred1_2_3 pred1_2_3_4_5 pred2_3_4_5, graph summ
plot1opts(msymbol(i) lpattern(solid) lcolor(red) )
plot2opts(msymbol(i) lpattern(-) lcolor(blue) )
plot3opts(msymbol(i) lpattern(-.) lcolor(green) )
plot4opts(msymbol(i) lpattern(..-) lcolor(maroon) )
legend(
order(- "Test: ROC area (SE)"
1 "pred1: 0.88 (0.03)"
2 "pred1+pred2+pred3: 0.88 (0.03)"
3 "pred1+pred2+pred3+pred4+pred5: 0.88 (0.03)"
4 "pred2+pred3+pred4+pred5: 0.69 (0.05)"
)
ring(0)
pos(4)
col(1)
colgap(.5)
rowgap(.8)
region(lstyle(none))
symxsize(6)
size(small)
)
graphr(fcolor(white))
xline(1, lcolor(black) lwidth(thin)) yline(1, lcolor(black) lwidth(thin))
plotregion(margin(zero))
ylabel(0 .25 .5 .75 1.0, angle(0) labsize(small) nogrid)
xlabel(, labsize(small) nogrid)
aspectratio(1)
name(roc_a, replace)
;
#delim cr
// This I like.
#delim ;
rocgold outcome pred1 pred2 pred3 pred4 pred5, graph summ
plot1opts(msymbol(i) lpattern(solid) lcolor(red) )
plot2opts(msymbol(i) lpattern(-) lcolor(maroon) )
plot3opts(msymbol(i) lpattern(-.) lcolor(dkorange))
plot4opts(msymbol(i) lpattern(..-) lcolor(blue))
plot5opts(msymbol(i) lpattern(_._) lcolor(green) )
legend(
order(- "Test: ROC area (SE)"
1 "pred1: 0.88 (0.03)"
2 "pred2: 0.65 (0.04)"
3 "pred3: 0.65 (0.05)"
4 "pred3: 0.68 (0.05)"
5 "pred5: 0.58 (0.05)"
)
ring(0)
pos(4)
col(1)
colgap(.5)
rowgap(.8)
region(lstyle(none))
symxsize(8)
size(small)
)
graphr(fcolor(white))
xline(1, lcolor(black) lwidth(thin)) yline(1, lcolor(black) lwidth(thin))
plotregion(margin(zero))
ylabel(0 .25 .5 .75 1.0, angle(0) labsize(small) nogrid)
xlabel(, labsize(small) nogrid)
aspectratio(1)
name(roc_b, replace)
;
#delim cr
// This I also like.
graph combine roc_a roc_b, col(1)
// This I hate. All the legends and text has been resized.
// I prefer to combine using Powerpoint.
****************************
**** End of Stata code *****
****************************
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/