Hi, I have created a scatterplot graph but am confused on how to incorporate how I can specify the line type for each variable. For example, If I add '-' to the scatterplot function, it ruins the whole graph. I would like for it to look like this:
But, my current code yields:
numVal =[2006 95 30 42 1492007 109 33 43 1642008 95 33 36 1672009 95 42 39 2092010 117 35 33 1762011 114 29 39 1472012 120 22 40 1102013 126 30 44 1512014 120 33 43 166];figure;title('Cholesterol Fall 2018');scatter(numVal(:,1),numVal(:,2), 'filled','cyan');hold on;xlabel('year');scatter(numVal(:,1),numVal(:,3), 'filled','r','o' );scatter(numVal(:,1),numVal(:,4), 'filled','green','o');scatter(numVal(:,1),numVal(:,5), 'filled','blue','d');grid on;legend('LDL Cholesterol','VLDL Cholesterol','HDL Cholesterol','Trygliycerides','Location','northwest')title('Cholesterol Fall 2018');
Best Answer