Why is the rotate function not working for images?
Show older comments
The documentation for the rotate function says that it works for images, but I am not getting the results I expect.
For example, in the following code, I’m trying to rotate both a line and an image object 45 degrees around the x-axis, but while the line is rotating the image is remaining in the x-y plane.
x = 100:100:1000;
y = randi(10,1,10)*50;
figure;
ax = axes;
h = plot(x,y);
rotate(h,[1 0 0],45)
hold on
im = imread('football.jpg');
i = image(im);
rotate(i,[1 0 0],45)
view(3)
Accepted Answer
More Answers (0)
Categories
Find more on Lighting, Transparency, and Shading in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!