I have three variables (Return, Risk, Supply) where I would like to present them on a scatter plot as the attached. I would like to plot them based on the two variables (Return and Risk) and I would like to color them based on the third variable (supply). Now I want to keep the color varying and I would like to make any value of the supply that is higher than 4800 blue and any value that is less than 4000 red? Anyway to help. I would like to add the colorbar and legend next to that. I have attached my data and code as below
pointsize = 100; figurescatter(Return,Risk, pointsize,Supply, 'filled')ylim([0 35])% colormap(jet(25))
% caxis([0 max([z1(:);z2(:)])])
colorbar;title('Efficient Frontier Focusing on Fields [1,2,8] Producing on Year 1');xlabel('Expected Risk, B$') % x-axis label
ylabel('Expected NPV, B$') % y-axis label
Best Answer