Filter löschen
Filter löschen

Error in resizing heatmaps in a subplotted figure

2 Ansichten (letzte 30 Tage)
Hello
When I run the following code
Frq_array = cellstr(string(3:38)); %(2:50));
fx = figure('MenuBar','none','Toolbar','none');
fx.WindowState = 'maximized';
for compo = 1:3
subplot(1,3,compo);
spec = squeeze(the_spectra(compo,:,:));
spec = spec';
switch compo
case 1
ylabel = ylabel_array;
this_title = 'Transverse';
case 2
ylabel = null_y_array;
this_title = 'Vertical';
case 3
ylabel = null_y_array;
this_title = 'Longitudinal';
end
%heatmap(Frq_array,ylabel,spec);
heatmap_new(spec,Frq_array,ylabel,[],'Colormap',chosen_colormap,'Gridlines',':'); %,'ShowAllTicks','true'); %'YlOrRd'); %'money'); %vte_colormap);
title(this_title);
end
where "heatmap_new" is the Customizable HeatMap by Ameya Deoras, I get the following error message, though the code works fine!
Unable to perform assignment because value of type 'string' is not convertible to 'cell'.
Error in heatmap_new>updateLabels (line 544)
ylabels(1:length(axInfo.ylab)) = axInfo.ylab;
Error in heatmap_new>resize (line 607)
updateLabels(hAxes(i), false);
Caused by:
Error using cell
Conversion to cell from string is not possible.
Error while evaluating Figure SizeChangedFcn.
Can I just disable this error? Or is it really something that I am not seeing?
Thanks,
Doug

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 6 Sep. 2022
Your ylabel_array or your null_y_array are string() arrays, which that File Exchange Contribution does not expect. You will need to change to cell array of character vectors.

Weitere Antworten (0)

Kategorien

Mehr zu Data Distribution Plots finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by