Displaying 3 heatmaps on a figure side by side

36 ビュー (過去 30 日間)
Jason
Jason 2021 年 2 月 12 日
回答済み: Jason 2021 年 2 月 12 日
Hello, I have 3 heatmaps on a UITab (I also have the underlying data for each as arrays).
I am trying to get just the 3 heatmaps onto a figure and then I can save that. However, it seems subplot doesn't work and I can't figure out other ways
f1=figure;
ax1=subplot(1,3,1,'parent',f1);
ax2=subplot(1,3,2,'parent',f1);
ax3=subplot(1,3,3,'parent',f1);
d1=get(app.HeatmapAPanel,'Children').ColorData
d2=get(app.HeatmapBPanel,'Children').ColorData
d3=get(app.HMDiffPanel,'Children').ColorData
h1=heatmap(ax1,d1);
h2=heatmap(ax2,d2);
h3=heatmap(ax3,d3);
I've also seen that you can use but it doesn't like the uigridlayout line
g = uigridlayout(f1,[1 3]);
p1 = uipanel(g);
p1.Layout.Row = 3;
p1.Layout.Column = 2;
h1=heatmap(p1,d1);

回答 (1 件)

Jason
Jason 2021 年 2 月 12 日
Work it out:
ax1=subplot(1,3,1,'parent',f1);
h1=heatmap(d1);
ax2=subplot(1,3,2,'parent',f1);
h2=heatmap(d2);
ax3=subplot(1,3,3,'parent',f1);
h2=heatmap(d3);

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by