From 2ebb2aa2f34a1f2fd68676d6a078dbf68852beb6 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Fri, 8 Jul 2011 00:34:50 -0400 Subject: gradient color colormap --- plot_beams_and_faces_figure.m | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/plot_beams_and_faces_figure.m b/plot_beams_and_faces_figure.m index ae979c4..a63ac85 100644 --- a/plot_beams_and_faces_figure.m +++ b/plot_beams_and_faces_figure.m @@ -16,8 +16,23 @@ function plot_beams_and_faces_figure(border_limits, img, faces, fig_handle) hold on; - %% colormap - colormap(1-gray); + %% color map as gradient of particular color + Ncolors=64; % number of colors + % starting values + hsv_s=rgb2hsv([1,0,0]); + hue_f = hsv_s(1); + sat_f = hsv_s(2); + val_f = hsv_s(3); + % stop values + hue_s = hue_f; + sat_s = 0; + val_s = 1; + hue=linspace(hue_s,hue_f, Ncolors); + sat=linspace(sat_s,sat_f, Ncolors); + val=linspace(val_s,val_f, Ncolors); + cmap = hsv2rgb([hue', sat', val']); + + colormap( cmap ); %% plot ray images imagesc(xc,yc, img); colorbar; -- cgit v1.2.3