Borrar filtros
Borrar filtros

Sometimes heatmap does not display decimal values

14 visualizaciones (últimos 30 días)
Peter Fraser
Peter Fraser el 14 de Oct. de 2021
Comentada: Peter Fraser el 14 de Oct. de 2021
I have data sets representing pressures. These are represented by a matrix of 16 x 16 x 400(ish), representing a time pressure sequence of 400 temporally-ordered frames of a 16 x 16 array of 256 pressure sensors. I wanted to display the time maximum (using heatmap()) for each pressure sensor, and that worked exactly as expected. I display two alternative data sets side by side (using subplot), and get theit color-mapped squares with values, as expected. If instead I look at the temporal average, I only get the color mapped squares without the the decimal values.
If I insert a breakpoint, and issue:
heatmap(peaks1); colormap default
or
heatmap(av1); colormap default
both work as expected, but the following code:
f=figure;
f.Position = [0 128 1920 1280];
peaks1 = max(p_seq1, [], 3);
peaks2 = max(p_seq2, [], 3);
av1 = mean(p_seq1, 3);
a2 = mean(p_seq2, 3);
subplot(1,2,1);
% heatmap(av1);
heatmap(peaks1); % displays text correctly
colormap default
title([gait, ' - ', horse, ' (OS)']);
subplot(1,2,2);
heatmap(av2); % displays no text
% heatmap(peaks2);
colormap default ;
title([gait, ' - ', horse, ' (EQ)']);
filename = [horse, ' - ', gait, '.jpg']
saveas(f, filename);
doesn't display text for the av1 heatmap.
To further confuse things, one out of the 20 or so datasets I am using does display the average values, but I have no idea why.
Both the av and the peak show in the workspace as 16x16 double.
Thoughts?
  4 comentarios
Mathieu NOE
Mathieu NOE el 14 de Oct. de 2021
at least problem solved !!
Peter Fraser
Peter Fraser el 14 de Oct. de 2021
Yes! I first tried the multiply-round-divide trick in the command window, and it didn't work (it gives four places after the decimal point, with the last three "zero". Fortunately it does work with heatmap.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

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

Etiquetas

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