How can I colour my delaunay triangulation based on concentration of some property?
조회 수: 7 (최근 30일)
이전 댓글 표시
I have a delaunay triangulation and I would like to display the increasing concentration of a property through the cells of the triangulation using the increasing intensity of a specified colour.
Please can anyone help with how to do this?
Thank you,
답변 (1개)
Walter Roberson
2015년 12월 10일
One way:
That is, use your triangulation to interpolate the value at a set of points.
Once you have the value, to express intensity of the color, use
target_color = [240, 18, 152]; %for example
cmap = linspace(0,1,256).' * target_color; %matrix multiply
and define the intensity that is to map to the bottom and the intensity that is to map to the top:
minintens = -85.32; %whatever appropriate
maxintens = 148139.2; %whatever appropriate
and now that you have the map, graph the intensity such as with
image(ArrayOfIntensities, [minintens, maxintens]);
colormap(cmap);
참고 항목
카테고리
Help Center 및 File Exchange에서 Delaunay Triangulation에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!