Error in resizing heatmaps in a subplotted figure

1 visualización (últimos 30 días)
Douglas Anderson
Douglas Anderson el 6 de Sept. de 2022
Respondida: Walter Roberson el 6 de Sept. de 2022
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 6 de Sept. de 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.

Más respuestas (0)

Categorías

Más información sobre Data Distribution Plots en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by