Graphics Reference
In-Depth Information
rotate(h, [a, e], a , [p,q,r]) rotates the object h by the angle a, according to the axis of
azimuth , elevation and the origin point (p, q, r) (which is optional, and is the origin point of
the axis of rotation, which is the center of the plot if not provided) .
reset(h) updates all properties assigned to the object h and set its properties to their
defaults.
delete(h) deletes the object h.
Here are some examples:
The following syntax changes the limits of variation of the current X , Y and Z axes to the specified values:
>> set(gca, 'XLim', [0,10], 'YLim', [-25, 25], 'ZLim', [-8,10])
The following syntax places the color of the background of the current figure in white:
>> set(gcf, 'Color', 'w')
The following syntax returns the current properties for the surface previously created and assigned to the variable
named surfh :
>> get(surfh)
The following syntax returns the line style to that of the surface surfh:
>> get(surfh, 'LineStyle')
The following syntax deletes the surface surfh :
>> delete(surfh)
eXerCISe 3-8
represent coordinates of the following parametric surface:
x(t) = 4cos(r) cos(t), y(t) = 2sine(r) cos(t), z (t) = sine(t) - p < r < p , - p /2 < t < p /2
so that it is presented in a figure with title "parametric surface" and whose background color is white, with a
black colored axis with the surface itself presented in a grid, colored according to the jet colormap, and enclosed
in a cube.
>> r = [-pi:0.1:pi]';
t = [-pi/2:0.1:pi/2];
x = 4*cos(r)*cos(t);
y = 2*sin(r)*cos(t);
z = ones(1,size(r))'*sin(t);
surface = surf(x, y, z);
set(surface,'EdgeColor', interp')
set(gcf, 'Color', 'w', 'Name', 'Parametric Surface');
set(gca,'XColor', 'k', 'YColor', 'k', 'ZColor', 'k', 'Box', 'on');
Search WWH ::




Custom Search