ytick.m

来自「JLAB is a set of Matlab functions I have」· M 代码 · 共 42 行

M
42
字号
function[]=ytick(i1,i2)%YTICK   Set locations of y-axis tick marks.%%   YTICK(DY) or YTICK DY where DY is a number uses DY as the interval%   between successive y-tick marks, with the endpoints being the%   left- and right-hand axes limits, and applies this to the current%   axis.%%   YTICK(DY) where DY is an array sets the 'ytick' property of the%   current ayis to DY.%%   YTICK(H,DY) applies the change to axes H.% %   See also XTICK%   __________________________________________________________________%   This is part of JLAB --- type 'help jlab' for more information%   (C) 2002--2006 J.M. Lilly --- type 'help jlab_license' for details       if strcmp(i1,'--t')    returnendif(nargin==1)   h=gca;   dy=i1;else   h=i1;   dy=i2;endif ischar(dy)  dy=str2num(dy);endif length(dy)==1  y=get(h,'ylim');  set(gca,'ytick',[y(1):dy:y(2)])else  set(gca,'ytick',dy);end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?