I create an image in an hgtransform object. When I try to rotate the hgtransform object 90 degrees, I expect the image to rotate 90 degrees. Instead of rotating, the image is distorted as it translates across the axes. The following code reproduces the issue:
load clowna = axes('XLim',[-150 150],'YLim',[-150 150]);h = hgtransform('Parent',a);colormap(map)image('CData',X, ... 'Parent',h, ... 'XData',[0 100], ... 'YData',[100 0]);for r = 0:1:90 T = makehgtform('zrotate',r*pi/180); set(h,'Matrix',T); pause(0.1); drawnowend
Best Answer