my goal is to create a colorbar to represent the colors of data lines plotted on a figure
the color of the lines follow the jet colormap pattern, so I feel this should be possible to do in Matlab.
time = 0:.1:5; %seconds
A = 10: %number of plots
plotColor = jet(A); %Creates a 10 by 3 matrix of colors transitioning from dark blue to dark red.
for H = 1:A
plot( H*sin(time), 'color', plotColor(:,H) )
In this example I want to have a color bar to represent the height of the sine wave as a function of the color of the lines.
I haven't been able to figure out a way to implement this yet and I would appreciate any help! Thank you in advance.