I want to plot pendulum (which changes position) using plot3
function. Unfortunately, when my dot changes position in loop and is being plotted again, the scale of
Try setting the XLim
, YLim
, and ZLim
properties before plotting. For example,
xlim=[-1 1];
or
haxe = gca;
haxe.XLim = [-1 1];
Also, you could set XLimMode
, YLimMode
, and ZLimMode
properties to manual
. For example,
haxe.XLimMode = 'manual'
For more information regarding axis properties see MATLAB's documentation for axis properties.