I'm using the GUI Layout Toolbox (which is great!) to create a GUI. The GUI includes a BoxPanel in which I have placed a scatter plot with size and colours varying according to a third variable.
gui.ViewAxes = axes( 'Parent', gui.ViewPanel ); ax=gui.ViewAxes; scatter(ax,x,y,zsize,zcolour,'filled')
(ViewPanel is a uiextras.BoxPanel) This works fine. But when I try to use the colorbar function:
cbar_handle=colorbar('peer',ax,'location','EastOutside');
not only does it not show any colorbar, the scatter plot itself vanishes and I am left with a blank panel.
Any way of getting the colorbar function to work in this context (I've used it for this type of chart in a simple figure without problems). Or is there another way of doing a colorbar without using the colorbar function?
Best Answer