- “tbl” is the table name “A”
- “xvar” indicates the variable name of the column to be displayed along the x-axis
- “yvar” indicates the variable name of the column to be displayed along the y-axis
- Specify “cvar” to control the heat map values according to the variable values. In this case, “cvar” corresponds to the 3rd column name.
How to generate a heat map using imported data with (x,y, z as color)
13 ビュー (過去 30 日間)
古いコメントを表示
I have imported a very large data file into MATLAB. I am curious how I can generate a heat map of the values using z as color so that the higher z values are more intense in color?
I have labled the imported file 'A' which is a 5798000x3 table. I have had success plotting the table using:
x = A{:,1};
y = A{:,2};
z = A{:,3};
figure(1)
plot3(Ax,Ay,Az)
grid on
however I would like to generate a heat map of the data.
Thanks in advance!
0 件のコメント
回答 (1 件)
Jyothis Gireesh
2019 年 11 月 19 日
You may use the following syntax to create the heat map.
h = heatmap(tbl,xvar,yvar,'ColorVariable',cvar)
where
Also, please refer to the following documentation link about creating heatmaps and customizing them
2 件のコメント
参考
カテゴリ
Help Center および File Exchange で Data Distribution Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!