|
|
How to rotate() annotation graphics?
Posted:
Nov 11, 2012 8:19 AM
|
|
Compare this, which rotates a patch() fine:
----------------------------- close all figure h=patch([-0.5,-0.5,0.5,0.5],[-0.5,0.5,0.5,-0.5],'r'); axis([-1 1 -1 1]); for i=1:30 rotate(h,[0,0,1],1); pause(0.1); drawnow end ----------------------------
But this rectangle below does not rotate, created using annotation:
-------------------------------------- close all figure; axis([-1 1 -1 1]); h=annotation('rectangle', [.3 .3 .3 .3])
for i=1:30 rotate(h,[0,0,1],1); pause(0.1); drawnow end -----------------------
Even though both are handle graphics?
Looking at rotate.m it seems to only supports subset of objects:
------------------------ for i=1:numel(h), t = get(h(i),'type'); skip = 0; if strcmp(t,'surface') || strcmp(t,'line') || strcmp(t,'patch') ............ elseif strcmp(t,'text') ............. elseif strcmp(t,'image') ............ else skip = 1; end ------------------------
So, it only rotates surface, line, patch, text and image.
So, how does one rotate annotations?
I am using 2012a.
thanks, --Nasser
|
|