Hello Everyone,
I managed to find a kind of solution, so the text is rotating now, but the arrow somehow disappeared, but at least I have the rotation working, I will keep working on it, unless someone can find me a better fix,
thanks in advance
figure1=figure('units','normalized','outerposition',[0 0 1 1]);
colormap(parula(10))
h= pie3(mat_data3(:,1), explode, repmat({''}, size(mat_data3(:,1))));
h2=annotation(figure1,'textarrow',[0.503125 0.503645833333333],...
[0.123595505617978 0.426966292134832],'String',{'particle1- 13 %'});
% Find HGTransform
t = hgtransform('Parent',gca);
% Make a Transform to rotate 360 degrees on x Axis
R = makehgtform('xrotate',2*pi);
Txy = makehgtform('translate',[-1.5 1.5 0]);
% Set the Transformation Matrix
set(t,'Matrix',R*Txy);
% Set the Parent of annotation textarrow to the new Transform
set(h2,'Parent',t); % The arrows should point correctly now but it does not
% Create textarrow
h3=annotation(figure1,'textarrow',[0.3359375 0.371875],...
[0.724813727070731 0.726418863507328],'String',{'particle2- 4 %'});
% Find HGTransform
t1 = hgtransform('Parent',gca);
% Make a Transform to rotate 360 degrees on x Axis
R1 = makehgtform('xrotate',2*pi);
Txy1 = makehgtform('translate',[-1.5 -1.5 0]);
% Set the Transformation Matrix
set(t1,'Matrix',R1*Txy1);
% Set the Parent of annotation textarrow to the new Transform
set(h3,'Parent',t1); % The arrows should point correctly now
% Create textarrow
h4=annotation(figure1,'textarrow',[0.350520833333333 0.390625],...
[0.771043759243553 0.76141294062397],'String',{'particle3- 11 %'});
% Find HGTransform
t2 = hgtransform('Parent',gca);
% Make a Transform to rotate 360 degrees on x Axis
R2 = makehgtform('xrotate',2*pi);
Txy2 = makehgtform('translate',[1.5 1.5 0]);
% Set the Transformation Matrix
set(t2,'Matrix',R2*Txy2);
% Set the Parent of annotation textarrow to the new Transform
set(h4,'Parent',t2); % The arrows should point correctly now but it does not
% Create textarrow
h5=annotation(figure1,'textarrow',[0.372395833333333 0.409375],...
[0.802054784918726 0.773162329059978],'String',{'particle4- 1 %'});
% Find HGTransform
t3 = hgtransform('Parent',gca);
% Make a Transform to rotate 360 degrees on x Axis
R3 = makehgtform('xrotate',2*pi);
Txy3 = makehgtform('translate',[1.1 1.1 0]);
% Set the Transformation Matrix
set(t3,'Matrix',R3*Txy3);
% Set the Parent of annotation textarrow to the new Transform
set(h5,'Parent',t3); % The arrows should point correctly now but it does not
% Create textarrow
h6=annotation(figure1,'textarrow',[0.413541666666667 0.430208333333333],...
[0.827866640498503 0.784527956710381],'String',{'particle5- 1 %'});
% Find HGTransform
t4 = hgtransform('Parent',gca);
% Make a Transform to rotate 360 degrees on x Axis
R4 = makehgtform('xrotate',2*pi);
Txy4 = makehgtform('translate',[1.5 1 0]);
% Set the Transformation Matrix
set(t4,'Matrix',R4*Txy4);
% Set the Parent of annotation textarrow to the new Transform
set(h6,'Parent',t4); % The arrows should point correctly now but it does not
% Create textarrow
h7=annotation(figure1,'textarrow',[0.4390625 0.459375],...
[0.856986899563319 0.786516853932584],'String',{'particle6- 26 %'});
% Find HGTransform
t5 = hgtransform('Parent',gca);
% Make a Transform to rotate 360 degrees on x Axis
R5 = makehgtform('xrotate',2*pi);
Txy5 = makehgtform('translate',[1.1 1 0]);
% Set the Transformation Matrix
set(t2,'Matrix',R5*Txy5);
% Set the Parent of annotation textarrow to the new Transform
set(h7,'Parent',t5); % The arrows should point correctly now but it does not
% Create textarrow
h8=annotation(figure1,'textarrow',[0.530729166666667 0.516145833333333],...
[0.863563402889246 0.798034934497817],'String',{'particle7- 42 %'});
% Find HGTransform
t6 = hgtransform('Parent',gca);
% Make a Transform to rotate 360 degrees on x Axis
R6 = makehgtform('xrotate',2*pi);
Txy6 = makehgtform('translate',[0.8 1.1 0]);
% Set the Transformation Matrix
set(t6,'Matrix',R6*Txy6);
% Set the Parent of annotation textarrow to the new Transform
set(h8,'Parent',t6); % The arrows should point correctly now but it does not
% Create textarrow
h9=annotation(figure1,'textarrow',[0.561979166666667 0.540104166666667],...
[0.820960698689956 0.776200873362445],'String',{'particle8- 1 %'});
% Find HGTransform
t7 = hgtransform('Parent',gca);
% Make a Transform to rotate 360 degrees on x Axis
R7 = makehgtform('xrotate',2*pi);
Txy7 = makehgtform('translate',[0.7 0.7 0]);
% Set the Transformation Matrix
set(t7,'Matrix',R7*Txy7);
% Set the Parent of annotation textarrow to the new Transform
set(h9,'Parent',t7); % The arrows should point correctly now but it does not
h1=title('Average Particle Occurrence', 'fontsize', 15);
n = 180;
mov(n) = getframe;
for i = 1:n
rotate(h, [20 20], 360 / n);
rotate(h1, [20 20], 360 / n);
rotate(h2, [20 20], 360 / n);
rotate(h3, [20 20], 360 / n);
rotate(h4, [20 20], 360 / n);
rotate(h5, [20 20], 360 / n);
rotate(h6, [20 20], 360 / n);
rotate(h7, [20 20], 360 / n);
rotate(h8, [20 20], 360 / n);
rotate(h9, [20 20], 360 / n);
mov(i) = getframe;
end