![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/893705/image.png)
How to plot heatmaps inside a table?
2 ビュー (過去 30 日間)
古いコメントを表示
採用された回答
AndresVar
2022 年 2 月 14 日
Maybe just have different axis for each radar. There are a few ways, but tiledlayout is easiest:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/893705/image.png)
heatvals = rand(4,40); % random data for 1 radar
% labels with prefix
y_labels = split(num2str(1:4));
y_labels = strcat('Target',{' '}, y_labels);
% tiledlayout with tight spacing
tlo = tiledlayout(2,1,'TileSpacing','tight');
% using imagesc to show colormaped data
h(1)=nexttile(tlo);
imagesc(heatvals)
yticklabels(y_labels)
xticklabels([]); % hide xlabels here
ylabel('Radar1')
h(2)=nexttile(tlo); % for radar2
imagesc(heatvals);
yticklabels(y_labels)
ylabel('Radar2')
% same colormap for the tiles
cb = colorbar;
set(h, 'Colormap', flipud(hot), 'CLim', [0 1])
cb.Layout.Tile = 'east';
2 件のコメント
AndresVar
2022 年 2 月 14 日
yes it looks like tight is not an option in R2019b, maybe you can try 'none' or 'compact'
in this case 'none' is similar to 'tight' since it doesn't have xtickslabels
その他の回答 (0 件)
参考
カテゴリ
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!