www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/RotatePlotAroundxAxisAndyAxisExample.m

    %% Rotate Plot Around _x_-Axis and _y_-Axis
% Create a surface plot of the |peaks| function and return the surface handle. 

% Copyright 2015 The MathWorks, Inc.


hSurface = surf(peaks(20));

%%
% Rotate the surface plot 25 degrees around its _x_-axis and _y_-axis.

direction = [1 1 0];
rotate(hSurface,direction,25)