I am running Isomap Dimensionality reduction in MATLAB on a series of images. I want to plot the image's thumbnail beside the point on the manifold corresponding to it.
I am currently using 2 differnt isomaps http://isomap.stanford.edu/ and http://robotics.cs.brown.edu/projects/stisomap/ .
The imagesc
function can take arguments which dictate where the image is drawn, so I would use this. Here's an example of imagesc
being drawn on top of a plot:
% Draw plot
vals=rand(2,100);
plot(vals(1,:),vals(2,:),'x');
hold on;
% Draw image
im=imread('moon.tif');
xs=linspace(0.1, 0.2, size(im, 2) );
ys=linspace(0.1, 0.2, size(im, 1) );
colormap gray;
imagesc(xs,ys,im)
Which looks like this:
Note the first two arguments to imagesc
which define the range over which the image is drawn. Obviously you'll want to change the arguments to linspace
, which will define the position and size of the image, and you'll need to take account for the aspect ratio if the image isn't square, but hopefully this will get you along the right lines.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With