# 3d plot change view / reverse axis

조회 수: 24(최근 30일)
john birt 2011년 5월 3일
I have a 3d plot generated by the following code
d = 30:2:70;
g = 30:2:70;
C = 0.02;
k=0.7;
[D,G] = meshgrid(d,g);
Z = (2^(-k-(3/2)).*12*((pi)^(0.5))*C.*(gamma(2-k).*(D.^(2*k-4)+G.^(2*k-4))))./((2^(-k-0.5).*((pi)^0.5)*C.*gamma(1-k).*(D.^(2*k-2)+G.^(2*k-2))).^2);
surf(D,G,Z)
The problem is that its not very easy to look at the 3d plot produced. If I could somehow look at it from the opposite side or reverse the bottom axis so they went from 70 to 30 (instead of 30 to 70), I could then get a plot that would view better.
Any thoughts on how to do this?

댓글을 달려면 로그인하십시오.

### 채택된 답변

Matt Fig 2011년 5월 3일
Have you tried the command:
rotate3d
Put this command after your call to SURF, then click on the plot and spin it around to wherever you want. Also, it would help you keep track of where you are if you put labels in the plot. For example, put this after your call to SURF:
xlabel('D')
ylabel('G')
zlabel('Z')

댓글을 달려면 로그인하십시오.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!