Colorbar displays in new figure
Mostrar comentarios más antiguos
Hello,
I am trying to add a colorbar to a heat map. I can do this for the most part through the GUI, but I'd like to do this from the command line.
hmo = HeatMap(dmo,'RowLabels', tblist, 'ColumnLabels', tblist, 'Colormap', bipolar);
colorbar;
displays the heat map, but causes the colorbar to display in a new figure (with a white plot area).
Thanks.
Respuesta aceptada
Más respuestas (3)
Paulo Silva
el 6 de Jul. de 2011
0 votos
Let me know if this is correct, you have the GUI open and you want to add the colorbar from a code on the command line?
If that's really what you want the problem can be corrected by going to GUI Options (layout editor (GUIDE) of your GUI) and clicking on the background with the right mouse button, select GUI Options and change the command-line accessibility to ON, that will allow the GUI figure and axes to become the current ones and the colorbar shows on them.
Lucio Cetto
el 11 de Jul. de 2011
0 votos
Adding to what Patrick said, please not that you can pass a PVP to the constructor HeatMap object with the colormap:
HeatMap(...,'COLORMAP',CMAP)
Thomas Keefe
el 28 de En. de 2020
0 votos
fig = figure;
h = HeatMap(...);
ax = plot(h, fig);
colorbar(ax);
Categorías
Más información sobre Color and Styling en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!