Make squared in legend instead of lines Matlab
问题 I have the following code, which plots a 'map' using imagesc, and provides a legend, see output attached. I am trying to replace the lines in the legend with solid squares. My attamps to far leave the lines and ad hollow squares (including a random square in the top left corner of the figure) figure(6) imagesc(lut) title('Ditribution of Land use Types') ylabel('Longitude') xlabel('Latitude') caxis([0, 7]) myColorMap = jet(6); imagesc(lut, 'AlphaData', ~isnan(lut)) colormap(myColorMap); L =