%% File ColorSpyMatrix.m clear A=zeros(16,16) A(5:12,5:12)=1 % any nonzero %% Line Specification='Line style, Marker symbol,Color' spy(A,'.r') % spy(A,'sr');% - for square shape %% But I want to edit propertis of my "picture"; % axes is parent for picture and... pAx=get(gca,'children') % Color: [1 0 0] % LineStyle: 'none' % LineWidth: 0.5000 % Marker: 'square' % MarkerSize: 6 % MarkerFaceColor: 'none' % lets we will change properties %% Line Specification='Line style, Marker symbol,Color' subplot(1,3,1) spy(A,'or') % spy(A,'sr');% - for square shape %% But I want to edit propertis of my "picture"; % axes is parent for picture and... pAx=get(gca,'children') % Color: [1 0 0] % LineStyle: 'none' % LineWidth: 0.5000 % Marker: 'square' % MarkerSize: 6 % MarkerFaceColor: 'none' %% lets we will change properties set(pAx,'MarkerSize',20,'MarkerFaceColor','y') % 'MarkerEdgeColor' exists too %% You need to think about the size of the marker! The quality of your image depends on this property! B=A; B(6:11,6:11)=0; subplot(1,3,2) spy(B,'m.'); pAxBorder=get(gca,'children'); set(pAxBorder,'MarkerSize',30,'MarkerFaceColor','m') set(pAx,'MarkerSize',20,'MarkerFaceColor','g') % 'MarkerEdgeColor' exists too %% You need to think about the size of the marker! The quality of your image depends on this property! B=A; B(6:11,6:11)=0; subplot(1,3,3) spy(B,'gs'); hold on % We need! Why? pAxBorder=get(gca,'children'); set(pAxBorder,'MarkerSize',20,'MarkerFaceColor','m') spy(B,'b.');