Error in resizing heatmaps in a subplotted figure
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Douglas Anderson
le 6 Sep 2022
Réponse apportée : Walter Roberson
le 6 Sep 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
0 commentaires
Réponse acceptée
Walter Roberson
le 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.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Distribution Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!