Hi,
I have created a grid layout ([3,2]) in a tab in a programmatical app. The column width for the grid layout is set to 'fit' for both columns. In the first row, I have a uitable and a uiaxes next to each other and in the second row, I have a uipanel and another uiaxes next to one another. The final row contains a button.
The content of the uipanel in the second row, is a heatmap based on the correlations between variables. I am using a uipanel as a parent since heatmap cannot be the child of uiaxes.
When I debug the code, the heatmap fills the uipanel perfectly and everything runs as expected. However, if I remove the breakpoints and run the code in normal mode, the heatmap resizes for some reason and becomes very small in the uipanel.
This is the code used to create the gridlayout:
g3=uigridlayout(tab3,[3 2]);
g3.RowHeight = {'fit','fit','fit'};
g3.ColumnWidth = {'fit','fit'};
testdata=array2table(zeros(13,4),"RowNames",variables,"VariableNames",{'Variable 1','Variable 2','Variable 3','Variable 4'});
t14=uitable(g3,"Data",testdata);
t14.ColumnEditable = repelem(false,4);
s1=uistyle(HorizontalAlignment='right');
The heatmap is calculated and assigned to the uipanel as follows:
hm=heatmap(ax_heat,variables, variables,R,'Colormap',jet);
- Is there a way to "force" the size of the heatmap to fill the entire uipanel?
- Why is the behaviour different between debugging (perfect) and normal mode?
Thanks in advance!