h1 = scatter3(X_Horiz,Y_Horiz,Z_Horiz,200,'s','filled',...
'MarkerEdgeColor','b','MarkerFaceColor',[0 .75 .75]);
hold on;
h2 = scatter3(X_Vert,Y_Vert,Z_Vert,200,'s','filled',...
'MarkerEdgeColor','g','MarkerFaceColor',[0 .75 .75]);
hold on;
I know scatter3 can draw vertical square, however, I want to draw horizontal square which is parallel with the light red two interfaces. I try the rotate function, but it does not work.