I am using the following code to create a graph with 5 plots:
Code:
coefplot (hba1c1, label(ELSA)) (hba1c2, label(US)) (hba1c3, label(HSE)) (hba1c4, label(Pooled)), bylabel(HbA1c) || (chol1) (chol2) (chol3) (chol4), bylabel(Cholesterol) /// || (sysval1) (sysval2) (sysval3) (sysval4), bylabel(Systolic BP) || (pulse1) (pulse2) (pulse3) (pulse4), bylabel(Pulse) /// || (wstval1) (wstval2) (wstval3) (wstval4), bylabel(Waist) xline(0) drop(_cons age) /// byopts(legend(pos(10))) order(sex white degree income3) msymbol(square) msize(small) scheme(plottig)
The following gets it closer, but it won't actually go in the blank space and instead goes outside the graph region:
Code:
coefplot (hba1c1, label(Survey 1)) (hba1c2, label(Survey 2)) (hba1c3, label(Survey 3)) (hba1c4, label(Pooled)), bylabel(HbA1c) || (chol1) (chol2) (chol3) (chol4), bylabel(Cholesterol) /// || (sysval1) (sysval2) (sysval3) (sysval4), bylabel(Systolic BP) || (pulse1) (pulse2) (pulse3) (pulse4), bylabel(Pulse) /// || (wstval1) (wstval2) (wstval3) (wstval4), bylabel(Waist) xline(0) drop(_cons age) /// byopts(legend(pos(4))) order(sex white degree income3) msymbol(square) msize(small) scheme(plottig)
Thus my problem is twofold:
1. How do I position the legend inside the blank space where the sixth graph would be if I had one?
2. How do I do this alongside maintaining the re-scaling option?
Any help much appreciated!
0 Response to Subgroups with coefplot allowing each graph to have its own scale and adjust location of legend
Post a Comment