Display Data From a Matrix or Table with Colour Scale

67 views (last 30 days)
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?

Answers (2)

Kuifeng
Kuifeng on 16 Apr 2016
doc contourf %it shows filled contour
  2 Comments
Kuifeng
Kuifeng on 16 Apr 2016
%I see. then this is the function you require,
doc pcolor

Sign in to comment.


Alex Ryabov
Alex Ryabov on 14 Jun 2022
Edited: Alex Ryabov on 14 Jun 2022
Better use
heatmap(rand(5, 3)); colormap(jet)

Categories

Find more on Tables in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!