I'm trying to produce a side-by-side twoway scatter plot using by(). I want to place the legend inside one of the two scatter plots, but am only succeeding in moving the legend around outside the plots.
Here's a simplified version of the graphing code:
twoway (scatter mean grade if fips==1&cohort==2015) ///
(scatter mean grade if cohort==2015 & fips==2), ///
by(subject) leg(ring(0) al(bottom) j(right))
(Note - I'm aware I can get to a solution with graph combine or grc1leg, but I'm trying to stick with the current framework for automation reasons.)
Here's a simplified version of the graphing code:
twoway (scatter mean grade if fips==1&cohort==2015) ///
(scatter mean grade if cohort==2015 & fips==2), ///
by(subject) leg(ring(0) al(bottom) j(right))
(Note - I'm aware I can get to a solution with graph combine or grc1leg, but I'm trying to stick with the current framework for automation reasons.)
Comment