I have a twoway command with five plots. I include an legend command that indicates that has an order subcommand of the form 1 plot1 2 plot2 3 plot3. Note that plots 1, 2, and 3 are all "lfits" and the other two are scatterplots. What the legend ends up showing is plot3, plot 4, and plot2 in that order. I have tried changing the order of the five plots but I still can't get the right info in the legend.
Am I missing something or is this a bug?
FYI, here is the full actual command:
twoway (lfit Recent Pop, lcolor(blue) lpattern(shortdash)) ///
(lfit Recent NumJudges,xaxis(2) lcolor(red) lpattern(dash)) ///
(lfit NumJudges Pop,lcolor(black) lpattern(solid) yaxis(2)) ///
(scatter Recent Pop, mcolor(blue) mlabel(Lab) mcolor(blue)) ///
(scatter Recent NumJudges,msymbol(smsquare) xaxis(2) mlabel(Lab) ///
mlabcolor(red) mcolor(red)), ///
legend(order(1 "NumJud by Pop" 2 "NumRec by Pop" 3 "NumRec by NumJ") ///
rows(1) size(*.6)) ///
graphregion(color(white)) ytitle(Number of Judges,axis(2)) ytitle(Number of Cases) ///
xtitle(Population in Millions,axis(2)) xtitle(Number of Judges)
Am I missing something or is this a bug?
FYI, here is the full actual command:
twoway (lfit Recent Pop, lcolor(blue) lpattern(shortdash)) ///
(lfit Recent NumJudges,xaxis(2) lcolor(red) lpattern(dash)) ///
(lfit NumJudges Pop,lcolor(black) lpattern(solid) yaxis(2)) ///
(scatter Recent Pop, mcolor(blue) mlabel(Lab) mcolor(blue)) ///
(scatter Recent NumJudges,msymbol(smsquare) xaxis(2) mlabel(Lab) ///
mlabcolor(red) mcolor(red)), ///
legend(order(1 "NumJud by Pop" 2 "NumRec by Pop" 3 "NumRec by NumJ") ///
rows(1) size(*.6)) ///
graphregion(color(white)) ytitle(Number of Judges,axis(2)) ytitle(Number of Cases) ///
xtitle(Population in Millions,axis(2)) xtitle(Number of Judges)

Comment