📄 lollipop.m
字号:
function lollipop(x,y,color,lw)% lollipop(x,y,color,lw) Plot lollipops (o's and sticks)if nargin<4 lw = 2; if nargin<3 color = ''; endendh = ishold;hold on;%Plot circlesplot(x,y,['d' color], 'linewidth', lw);% Make x and y row vectors, then plot as sticksx = x(:)'; y = y(:)';x = [x;x;nan*ones(size(x))];y = [y;zeros(2,length(y))];plot(x(:),y(:),color, 'linewidth', lw);if ~h hold off;end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -