How to display Heatmap plot in UI Axes of matlab app designer ?
36 次查看(过去 30 天)
显示 更早的评论
I tried using
heatmap(app.UIFigure.UIAxes,A,XValue_Text,X2Value_Text)
heatmap(app.UIFigure,app.UIAxes,A,XValue_Text,X2Value_Text)
but both options are not working and showing errors.
Please guide.
Thank You
1 个评论
Ankit
2020-1-29
Check this out Displaying Graphics in App Designer
Grid layout managers and scrollable containers do not support axes, polaraxes, geoaxes, or charts (such as heatmap, geobubble, or stackedplot) that can be the child of a figure
You can display it on figure not on the axes. But you want to display it on the UIaxes. I would recommend to contact MATLAB support.
cdata = [45 60 32; 43 54 76; 32 94 68; 23 95 58];
xvalues = {'Small','Medium','Large'};
yvalues = {'Green','Red','Blue','Gray'};
heatmap(app.UIFigure,xvalues,yvalues,cdata)
采纳的回答
Mohammad Sami
2020-1-29
编辑:Mohammad Sami
2020-1-29
Place Uipanel in the position you want heatmap.
h = heatmap(app.Panel1,tbl,xvar,yvar);
4 个评论
更多回答(1 个)
Sebastien
2020-4-5
Hello,
I have the same problem with the heatmap function and App Designer. So I tried the Accepted Answer but it just does not work on my side.
I added a blank panel and tried different versions of the code such as:
heatmap(app.Panel,tbl,xvar,yvar)
heatmap(app.Panel,xvar,yvar,tbl)
So I don't understand what I did wrong...
heatmap(xvar,yvar,tbl) works fine outside of the App Designer.
Thanks in advance for any help!
5 个评论
Mohammad Sami
2020-4-8
If you can't update then you may have to pop up a separate figure window and display the heatmap separately.
另请参阅
类别
在 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!