Looking for a Surface - like plot

조회 수: 1 (최근 30일)
Ted Baker
Ted Baker 2019년 11월 2일
댓글: Star Strider 2019년 11월 3일
I'm wanting to plot a 2d array in a sort of heatmap form, with different colours representing different valuess, similiar to this image.
where I have a 4x3 element array.
However, when I use surf (or variants of) it seems to link the colour to surrounding elements, rather than the value in each element itself. In other words, I will end up with a plot of 3x2 squares for the example array above.
Can someone suggest the exact sort of plot I should be looking for? I'm not a fan of contour as that seems to extrapolate between samples and my data is discrete. Thanks in advance.

채택된 답변

Star Strider
Star Strider 2019년 11월 2일
I am not certain what you want.
However the heatmap (R2017a and later) function and image may be options.
  댓글 수: 2
Ted Baker
Ted Baker 2019년 11월 3일
Thank you Star Strider, image turned out to be exactly what I was after.
Star Strider
Star Strider 2019년 11월 3일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by