How can I use the scatter function in GNU Octave in order to assign colors to each plotted value ?
Here's a nice illustrative example:
X = linspace(0, 4 * pi, 100); % Create points (100 elements)
Y = 100 * sin(X);
S = Y + 100; % Sizes array. All values need
% to be larger than 0
C = [linspace(0,1,100); ones(1,100); ones(1,100)]'; % create hsv triplets at full
% saturation and value that
% cover the whole colour
% (i.e. hues) spectrum
C = hsv2rgb(C); % convert to rgb triplets; to
% be used as a 'colour array'
scatter(X,Y,S,C,'filled','MarkerEdgeColor','k'); % fill bubbles, black border