how to display the whole image in the background
without white section ?
my intention is to plot the points directly on the background ( see the image)
y =[9; 9; 10; 9; 9; 9; 10; 9; 9; 10; 10; 10; 10; 10;9;9;9;9;9;9;10;10;10;10;10];x =-[-5; -6; -4; 4; 5; 6; 1; 1; 3; -2; -1; 4; 6; -6;0;-1;-2;-3;2;-4;0;-3;-5;5;2];hic =['Gelb ';'Orange';'Braun ';'Gelb ';'Gelb ';'Gelb ';'Orange';'Orange';'Grün ';'Orange';'Orange';'Gelb ';'Orange';'Orange';'Orange';'Grün ';'Gelb ';'Grün ';'Gelb ';'Gelb ';'Orange';'Gelb ';'Gelb ';'Gelb ';'Gelb '];h= gscatter(x,y,hic);axis([-8 8 7 13]);jgroup = h(1);jgroup.Color = 'y';jgroup.MarkerSize = 30;jgroup = h(2);jgroup.Color = [1,0.563,0];jgroup.MarkerSize = 30;jgroup = h(3);jgroup.Color = [0.8500, 0.3250, 0.0980];jgroup.MarkerSize = 30;jgroup = h(4);jgroup.Color = 'g';jgroup.MarkerSize = 30;hold onha = axes('units','normalized', ... 'position',[0 0 1 1]);% Move the background axes to the bottom
uistack(ha,'bottom');% Load in a background image and display it using the correct colors
% The image used below, is in the Image Processing Toolbox. If you do not have %access to this toolbox, you can use another image file instead.
I=imread('Auto_Raster.PNG');hi = imagesc(I);% Turn the handlevisibility off so that we don't inadvertently plot into the axes again
% Also, make the axes invisible
set(ha,'handlevisibility','off', ... 'visible','off')
Best Answer