필터 지우기
필터 지우기

How to display Heatmap plot in UI Axes of matlab app designer ?

조회 수: 33 (최근 30일)
Rohit Deshmukh
Rohit Deshmukh 2020년 1월 29일
댓글: Sebastien 2020년 4월 9일
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
Ankit 2020년 1월 29일
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
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
Rohit Deshmukh
Rohit Deshmukh 2020년 1월 30일
Hi,
the previous solution is working with a different panel.
I figured out that UI axes is superimposing the HeatMap plot.
I tried to disable the UI axes , but still the blank thing is superimposing Heatmap.
Is there a solution by which I somehow delete/disappear the UI Axes when HeatMap plot is selected?
Mohammad Sami
Mohammad Sami 2020년 4월 7일
you can set the visibility of the axes to off perhaps

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Sebastien
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
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.
Sebastien
Sebastien 2020년 4월 9일
Ok, thanks for your answer.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by