Dear All,
I am using the code below to create multiple oberlapping scatter plots including fitted line. i am creating scatter plots for men and women for different depnedent variables and the same independent varible. when the the plot is created i don't know which color is for men and which oone is for women. what should i add the to the code to leable the colors by gender.
thanks in advance
stata 15.1 mac
I am using the code below to create multiple oberlapping scatter plots including fitted line. i am creating scatter plots for men and women for different depnedent variables and the same independent varible. when the the plot is created i don't know which color is for men and which oone is for women. what should i add the to the code to leable the colors by gender.
thanks in advance
Code:
ocal j = 1 local names foreach v of varlist bmi_w waistcm_w hipcm_w whratio_w fatmass_w fmi_w fat_w bai_w vat_w ffm_w bodyweighkg_w { twoway (scatter `v' psaaa_w if sex==0)(scatter `v' psaaa_w if sex==1) (lfit `v' psaaa_w if sex==0)(lfit `v' psaaa_w if sex==1), name(graph`j') local names `names' graph`j' local ++j } graph combine `names'
Comment