Or you could do it the expensive way and make actual spheres
clf
x = linspace(0,1,10);
y = x.^2;
% plot the lines
plot(x,y,'k'); hold on
% plot the markers
scale = 0.015;
[xx yy zz] = sphere(20);
xx = xx*scale;
yy = yy*scale;
zz = zz*scale;
for k = 1:numel(x)
surf(xx+x(k),yy+y(k),zz)
end
shading flat
colormap([1 1 1]*0.7)
lightangle(gca,-135,45)
lighting gouraud
material([0.3 1 1])
xlim([-0.01 1])
ylim([0 1.01])
You could also create any small image and place copies of it as markers. Note the use of transparency and the fact that the marker will appear upside-down.
clf
x = linspace(0,1,10);
y = x.^2;
% plot the lines
plot(x,y,'k'); hold on
% place actual marker images
[mk,~,alph] = imread('sphmarker.png'); % sphere
%[mk,~,alph] = imread('sphmarker2.png'); % smiley
markerrad = 0.015;
for k = 1:numel(x)
im = imagesc(x(k)+[-1 1]*markerrad,y(k)+[-1 1]*markerrad,mk);
im.AlphaData = alph;
end
You might also be able to look an the FEX and see if someone has a solution that would work.