Display Data From a Matrix or Table with Colour Scale

조회 수: 39 (최근 30일)
j atkinson
j atkinson 2016년 4월 16일
편집: Alex Ryabov 2022년 6월 14일
Hi everyone, I am still relatively inexperienced with MATLAB so please be patient, hopefully someone can help as I'm a bit desperate.
I am trying to display data from a table in a an easy to view format with a colour scale,
I have created a joint occurrence table showing how often the two variables H and T occur using hiscounts2
hst = histcounts2(H, T, 0:0.5:10, 1:1:12)
this creates the following set of results;
I have 201600 data points and would like to display the table with a colour scale highlighting the most frequently occurring ranges.
I am trying to emulate something similar to this
Does anyone have any ideas how I can achieve this?

답변 (2개)

Kuifeng
Kuifeng 2016년 4월 16일
doc contourf %it shows filled contour
  댓글 수: 2
j atkinson
j atkinson 2016년 4월 16일
thanks for your reply,
thing is I would like to keep values within bins and instead of a contour plot I would like to display more like this;
Kuifeng
Kuifeng 2016년 4월 16일
%I see. then this is the function you require,
doc pcolor

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


Alex Ryabov
Alex Ryabov 2022년 6월 14일
편집: Alex Ryabov 2022년 6월 14일
Better use
heatmap(rand(5, 3)); colormap(jet)

카테고리

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