I'm want to plot an an interaction effect, with labels in the legend. Thus, I'm using this code:
Code:
margins, at(cfo_fin_acc_l1=(0(1)1) cfo_age_w_l1=(38(9)65)) vsquish marginsplot, plot1opts(msymbol(O )) plot2opts(msymbol( D )) plot3opts(msymbol( T )) plot4opts(msymbol( S)) saving("Margins_CFO_Fin_Acc", replace) legend(order(1 "CFO Age = 38" 2 "CFO Age = 47" 3 "CFO Age = 56" 4 "CFO Age = 65"))
Array
Although the labels are now displayed in the legend, the plot options are no longer displayed in the legend, as it was the case in the default version without the legend-option (The symbol of the marker is missing): Array
I was wondering if there is an option to display the label with the marker symbol in the legend? (e.g., a blue line with an O and the label " CFO Age = 38")
All options (mlabel, legend(label()),...) that I tried, did not work.
Thanks in advance!
Kind regards,
Marius Meyerhoff
0 Response to Marginsplot legend labeling with plotopts
Post a Comment