Panning plots over an image
Mostrar comentarios más antiguos
Hi, I would like to pan an plot that is plotted over an image in the same axes. How do I transform/pan the plot separately from the image? Right now when I enable pan, it pans the axes as a whole. Thanks
Respuestas (1)
Sean de Wolski
el 7 de Jul. de 2011
Use slice to plot it:
I = imread('cameraman.tif'); %sample image
H = slice(double(repmat(I,[1 1 2])),[],[],1); %slice it
set(H,'EdgeColor','none'); %required so image isn't just an edge
colormap gray %gray it
You may also want to look at my FEX:meshCanopy function that plots a mesh over an image with separate color maps. It might give you some ideas.
2 comentarios
Khoa
el 7 de Jul. de 2011
Sean de Wolski
el 8 de Jul. de 2011
The slice function shows images of slices through an image volume. As for being able to rotate the plot without rotating the image, I don't know how to do that.
Categorías
Más información sobre Color and Styling en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!