📄 my_plot3.m
字号:
function my_plot3(x,y,z)
cax = newplot;
%检测当前的hold状态
hold_state = ishold;
LSO = ['- ';'--';': ';'-.'];
if nargin == 2
hlines = line(x,y,'Color','k');
%如果hold为off时,改变视图
if ~hold_state
view(2)
end
elseif nargin == 3
hlines = line(x,y,z,'Color','k');
%如果hold为off时,改变视图
if ~hold_state
view(3)
end
end
ls = 1;
for hindex = 1:length(hlines)
if ls > length(LSO),ls = 1;end
set(hlines(hindex),'LineStyle',LSO(ls,:))
ls = ls + 1;
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -