Azzera filtri
Azzera filtri

Error in resizing heatmaps in a subplotted figure

1 visualizzazione (ultimi 30 giorni)
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

Risposta accettata

Walter Roberson
Walter Roberson il 6 Set 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.

Più risposte (0)

Categorie

Scopri di più su Data Distribution Plots in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by