Hi Statalist,
I am using marginsplot to graph an interaction (Stata 15). I have gotten the plot close to what I want but am having trouble with the legend. Is there a way to get rid of the markers that are in the center of the lines in the legend? I only want the lines, one solid and the other dashed. Here is my syntax:
I uploaded the graph as png. Hopefully it is legible.
Thanks for your help,
Robbie
I am using marginsplot to graph an interaction (Stata 15). I have gotten the plot close to what I want but am having trouble with the legend. Is there a way to get rid of the markers that are in the center of the lines in the legend? I only want the lines, one solid and the other dashed. Here is my syntax:
Code:
marginsplot, x(cl_kEzs2) /// xlab(-.25 " " 0 "Restricted" /// 1 "Diverse" 1.25 " ", notick) /// xlab(,labsize(med)) /// plot1opts(msymbol(O) mcolor(red) lcolor(red) lwidth(medthick)) /// ci1opts(lcolor(red)) /// plot2opts(msymbol(O) mcolor(navy) lcolor(navy) lwidth(medthick) lpattern("--")) /// ci2opts(lcolor(navy)) /// legend(pos(6) size(medsmall) symxsize(15)) /// xtitle("SNT", size(medlarge)) /// ytitle(Pr(Major depression), size(medlarge)) /// ylab(, labsize(med)) /// title("") /// aspectratio(.8) /// plot( , label("No" "Yes"))
Thanks for your help,
Robbie
Comment