MATLAB Answers

I want to plot custom colorbar of lines plotted on the image. Kindly suggest me a solution.

4 views (last 30 days)
Raja Sekhar Bandaru
Raja Sekhar Bandaru on 2 Oct 2016
Answered: Walter Roberson on 2 Oct 2016
NColors = 10;
RGBn = linspecer(NColors);
moon = imread('moon.tif');
quiver(0,0,5,5,'color',mycol); %mycol is conditionally selected from RGBn; multiple arrows are plotted on the image
colorbar % shows the colorbar of moon. But I want to display the colorbar of my custom 10 colors. Is that possible?


Sign in to comment.

Answers (1)

Sign in to answer this question.