When I run the code
Code:
sysuse auto, clear summarize price mata: mean = st_numscalar("r(mean)") sd = st_numscalar("r(sd)") p = st_data(., "price") R = st_nobs() plot_m = sort( (p, (1::R)), 1), mean :+ sd :* invnormal( (1::R) :/ (R+1)) m = plot_m[., (1,3)] mlbl = plot_m[., 2] end twoway (scatter matamatrix(m)) (function y=x, range(price)) , legend(off)
Array
However, I would like to add marker labels in the scatter plot.
But I can't. I've tried eg.
Code:
. twoway (scatter matamatrix(m), mlabel(matamatrix(mlbl))) (function y=x, range(price)) , legend(off) option mlabels() not allowed r(198);
0 Response to marker label values in twoway mata
Post a Comment