A book I'm reading contains the following diagram.
I'm looking to replicate as closely as possible the following diagram in MATLAB. I managed to recreate the lines, but am having trouble filling the colours in.
possible_colours = {'r','g','b','c','m','y','w','k','r'};
H = [0.01:0.01:0.99];
colour_counter = 0;
for ii = -0.8:0.2:0.8
colour_counter = colour_counter + 1;
colour_now = possible_colours{colour_counter};
ORSS = ones(1,size(H,2))*ii;
F = (H .* (1-ORSS)) ./ ((1-2.*H) .* ORSS + 1);
hold on
plot(F,H)
fill(F,H,colour_now);
end
With fill(F,H,colour_now)
taken out the code perfectly recreates the required lines. However, the fill isn't correct.
This heavily upvoted answer by @Doresoom seems relevant, but it's a bit different because in that example the x-values are held constant, while in my case it's the y-values that are held constant. Also, in that case there is only a pair lines, whereas I have lots of them.