How to change the shape/size of a HeatMap/clustergram?
39 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ziwei Liu
el 24 de Jun. de 2021
Respondida: Clara
el 26 de Sept. de 2022
Hi, I'm working on a data with a 8 by 53 matrix, and I'm trying to generate a heatmap using the HeatMap function. The figure turns out to be undesirable since each block is a thin, long rectangle. I know it's probably due to the size of the input data so the function automatically scaled the figure so that the entire image looks like a square. I guess if I had a 50 by 50 matirx, each block may be a square and the image may be more good-looking, but I can't change the data I have. So, are there any way to overcome this? Thanks.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/663720/image.png)
0 comentarios
Respuesta aceptada
Clara
el 26 de Sept. de 2022
Maybe you can control the size of the graph using:
set(gcf, 'Position', [x, y, horizontal length, vertical length]).
For a 5 by 41 matrix, set(gcf, 'Position', [100, 100, 1000, 200]) works well for me.
Hope it is helpful!
0 comentarios
Ver también
Categorías
Más información sobre Expression Analysis en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!