Creating rgb vector based on Z data for standard colorbar
이전 댓글 표시
I have Z data for my x, and y data for which I would like to plot in a standard plot using the z data as a colorbar. I know that using the handle 'color' you can specify a nx3 vector for the n points of x and y data you have. If I use the standard 'colorbar' option, how can I create these color vectors based on the values of z of my data?
For example:
x=linspace(0,10)
y=linspace(0,10)
z=rand(1,100)
% now I want to plot z and convert the values in their respective colors
% where the highest color will be yellow and lowest color blue
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Color and Styling에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
