Aesthetic Plotting with Graphics

15 次查看(过去 30 天)
Jason
Jason 2011-10-29
How can I change the plot marker to a picture(.png) I have in my directory as opposed to the default markerstyle (like 'x' or 'o') Is this possible to do?

回答(1 个)

Sven
Sven 2011-10-31
Not really, but you could instead use image() multiple times:
xyData = randi(100, 30,2);
markerIm = imread('rice.png');
markerSz = 5;
figure, hold on
for i = 1:size(xyData,1)
imagesc([-.5 .5]*markerSz + xyData(i,1), [-.5 .5]*markerSz + xyData(i,2), markerIm)
end
axis image, colormap(gray)

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by