I want to create a plot of 2D data that is generated using different parameters. Something like this:
figure;
hold on;
parameters = [1:10];
for param = parameters;
x = [1:10];
y = ones(10) * param;
plot(x, y);
endfor
hold off;
Instead of cluttering the graph with a legend (the range of param might become large, and then it would look similar to plotting color codded graph in matlab), I'd like to add a color map to the right of the graph. Something similar to this: gnuplot linecolor variable in matplotlib? How do I do this?
I found the "colorbar" command, but that only visualizes the range [0:1] of the current color map. The "caxis" command can help then. See also: http://cresspahl.blogspot.de/2012/04/octave-quickies-customizing-colorbar.html