1. 程式人生 > >Matlab 繪圖時hold on 和hold off用法

Matlab 繪圖時hold on 和hold off用法

matlab幫助文件原文如下:

hold ON holds the current plot and all axis properties, including the current color and linestyle, so that subsequent graphing commands add to the existing graph without resetting the color and linestyle. hold OFF returns to the default mode whereby PLOT commands erase the previous plots and reset all axis properties before drawing new plots.

對應翻譯
hold on:保持當前繪圖和所有軸屬性(包括當前顏色和線型),以便隨後的繪圖命令新增到現有圖形中,而不重置顏色和線型。hold off:返回預設模式,藉此PLOT命令擦除前面的繪圖和在繪製新圖之前重置所有座標軸屬性