Hi, I'm creating a scatterplot using marginsplot and would like the color of the markers/datapoints to vary based on the levels of the variable I'm plotting. For example,
creates a marginsplot by the school average LRT score (schav) and I would like it if the "low" category was blue, the "mid" category was purple, and the "high" category was red instead of all being red markers. I've seen examples on the forum for how to do this with scatterplots more generally, including the sepscatter user-written command, but as far as I can tell none would work directly with marginsplot.
Note also that I am using Stata 13.
Graph.gph
Code:
use "http://www.bristol.ac.uk/cmm/media/runmlwin/tutorial.dta", clear regress standlrt i.girl i.schav margins schav marginsplot, recast(scatter) plotopts(mcolor("red"))
Note also that I am using Stata 13.
Graph.gph
Comment