I'm trying to get my fit line to be the same opacity as the scatter points. How can I convert the line color from the way that I have it to the 4D color i.e [0 0 0 0.5] ?
scatter(TDSad.Agemos,TDSad.(measureToAnalyze),'k','v','MarkerEdgeAlpha',0.5)
scatter(DSSad.Agemos,DSSad.(measureToAnalyze),'m','^','filled')
[sortedTD, sortItd] = sort(TDSad.Agemos);
p1 = plot(sortedTD,TDall_yfit(sortItd),'LineStyle','--','Color','k','LineWidth', 2,);
p2 = plot(DSSad.Agemos,DSall_yfit,'LineStyle','-','Color','m','LineWidth',2);