Navigation

Operators and Keywords

Function List:

C++ API

axis.m File Reference


Functions

 if (isempty(varargout)) __axis__(h
endif unwind_protect_cleanup axes (oldh)
 if (view(2)==90) curr_axis
endif endif elseif (ischar(ax)) len
 if (strcmpi(ax,"ij")) set(ca
 elseif (strcmpi(ax,"xy")) set(ca
 elseif (strcmpi(ax,"image")) __axis__(ca
equal __do_tight_option__ (ca)
 elseif (strcmpi(ax,"square")) if(__gnuplot_has_feature__("screen_coordinates_for_
margin set (ca,"dataaspectratio",[1, 1, 1])
endif elseif (strcmp(ax,"equal")) if(__gnuplot_has_feature__("screen_coordinates_for_
endif elseif (strcmpi(ax,"normal")) set(ca
 elseif (len >=4 &&strcmpi(ax(1:4),"auto")) if(len > 4) if(any(ax
endif if (any(ax=="y")) set(ca
endif if (any(ax=="z")) set(ca
endif else set (ca,"xlimmode","auto","ylimmode","auto","zlimmode","auto")
endif elseif (strcmpi(ax,"manual")) set(ca
 elseif (strcmpi(ax,"tight")) __do_tight_option__(ca)
 elseif (strcmpi(ax,"on")||strcmpi(ax,"tic")) set(ca
 if (strcmpi(ax,"on")) set(ca
endif set (ca,"visible","on")
 elseif (strcmpi(ax,"off")) set(ca
 set (ca,"visible","off")
 elseif (len > 3 &&strcmpi(ax(1:3),"tic")) if(any(ax
else set (ca,"xtick",[])
else set (ca,"ytick",[])
else set (ca,"ztick",[])
endif elseif (strcmpi(ax,"label")) set(ca
 elseif (strcmpi(ax,"nolabel")) set(ca
 elseif (len > 5 &&strcmpi(ax(1:5),"label")) if(any(ax
else set (ca,"xticklabel","")
else set (ca,"yticklabel","")
else set (ca,"zticklabel","")
endif else warning ("unknown axis option '%s'", ax)
endif elseif (isvector(ax)) len
 !plot (-3:3,-3:3,";line (-3,-3)->(3,3);")
 !title ("manual")
 !axis ("manual")
 !subplot (324)
 !plot (t, x,";sine [0:2pi];")
 !title ("axes at [0 3 0 1], then autox")
 !axis ([0, 3, 0, 1])
 axis ("autox")
 !subplot (325)
 !plot (t, x,";sine [0:2p];")
 axis ("autoy")
 !title ("axes at [3 6 0 1], then autoy")
 !subplot (326)
 !plot (t, sin(t), t,-2 *sin(t/2))%!axis("tight")
 !title ("tight")
 !plot (x, sin(x))%!axis image%!title("image")%!demo%!clf%![x
 !pcolor (x-x1, y-x1/2, z)%!hold on%![x

Variables

function varargout
 oldh = gca ()
unwind_protect axes (h)
 else [varargout{:}] = __axis__ (h, varargin{:})
end_unwind_protect endfunction
function 
curr_axis
else xlim = get (ca, "xlim")
 ylim = get (ca, "ylim")
 view = get (ca, "view")
else zlim = get (ca, "zlim")
 ydir
 reverse
 normal
else x = xlim
 y = ylim
endif dataaspectratiomode
endif auto
endif ylimmode
endif zlimmode
endif xlimmode
endif manual
 xtickmode
 ytickmode
 ztickmode
 xticklabelmode
 yticklabelmode
 zticklabelmode
 xtick
 ytick
 ztick
 xticklabel
 yticklabel
 zticklabel
if(len!=2 &&len!=4 &&len!=6)
error("axis 
sine [0:2pi]
hold on
hold off
!demo!clf!axis image !x = 0:0.1:10
 z = peaks(50)
 !x1 = max(x(:))
 !s = x1/max(x(:))

Function Documentation

!axis (  ) 

!axis ( "manual"   ) 

!pcolor ( x-  x1,
y-x1/  2,
 
)

!plot ( ,
sin(x)   
)

!plot ( ,
sin(t)  ,
,
-2 *  sint/2 
)

!plot ( ,
,
";sine ;"  [0:2p] 
)

!plot ( ,
,
";sine ;"  [0:2pi] 
)

!plot ( -3:3  ,
-3:3  ,
";line (-3,-3)->(3,3);"   
)

!subplot ( 326   ) 

!subplot ( 325   ) 

!subplot ( 324   ) 

!title ( "tight"   ) 

!title ( "axes   at[3 6 0 1],
then autoy"   
)

!title ( "axes   at[0 3 0 1],
then autox"   
)

!title ( "manual"   ) 

equal __do_tight_option__ ( ca   ) 

endif unwind_protect_cleanup axes ( oldh   ) 

axis ( "autoy"   ) 

axis ( "autox"   ) 

endif elseif ( isvector(ax)   ) 

elseif ( len  ,
5 &&  strcmpiax(1:5),"label" 
)

Type Constraints

elseif ( strcmpi(ax,"nolabel")   ) 

endif elseif ( strcmpi(ax,"label")   ) 

elseif ( len  ,
3 &&  strcmpiax(1:3),"tic" 
)

elseif ( strcmpi(ax,"off")   ) 

elseif ( strcmpi(ax,"on")||strcmpi(ax,"tic")   ) 

elseif ( strcmpi(ax,"tight")   ) 

endif elseif ( strcmpi(ax,"manual")   ) 

elseif ( len >=4 &&  strcmpiax(1:4),"auto"  ) 

endif elseif ( strcmpi(ax,"normal")   ) 

endif elseif ( strcmp(ax,"equal")   ) 

elseif ( strcmpi(ax,"square")   ) 

elseif ( strcmpi(ax,"image")   ) 

elseif ( strcmpi(ax,"xy")   ) 

endif endif elseif ( ischar(ax)   ) 

if ( strcmpi(ax,"on")   ) 

endif if ( any(ax=="z")   ) 

endif if ( any(ax=="y")   ) 

if ( strcmpi(ax,"ij")   ) 

if ( view(2)  = =90  ) 

if ( isempty(varargout)   ) 

else set ( ca  ,
"zticklabel"  ,
""   
)

else set ( ca  ,
"yticklabel"  ,
""   
)

else set ( ca  ,
"xticklabel"  ,
""   
)

else set ( ca  ,
"ztick"   
)

else set ( ca  ,
"ytick"   
)

else set ( ca  ,
"xtick"   
)

set ( ca  ,
"visible"  ,
"off"   
)

Type Constraints

endif set ( ca  ,
"visible"  ,
"on"   
)

endif else set ( ca  ,
"xlimmode"  ,
"auto"  ,
"ylimmode"  ,
"auto"  ,
"zlimmode"  ,
"auto"   
)

margin set ( ca  ,
"dataaspectratio"   
)

endif else warning ( "unknown axis option '%s'"  ,
ax   
)


Variable Documentation

!s = x1/max(x(:))

!demo ! clf ! axis image !x = 0:0.1:10

!x1 = max(x(:))

endif auto

Initial value:

 __axis__ (ca, ax, varargin)

  if (nargin == 1)
    if (nargout == 0)
      set (ca, "xlimmode", "auto", "ylimmode", "auto", "zlimmode", "auto")

else[varargout{:}] = __axis__ (h, varargin{:})

hold off

oldh = gca ()

hold on

if (len != 2 && len != 4 && len != 6) error ("axis sine[0:2pi]

varargout

Initial value:

 axis (varargin)

  [h, varargin, nargin] = __plt_get_axis_arg__ ("axis", varargin{:})

view = get (ca, "view")

margin x = xlim

else xlim = get (ca, "xlim")

y = ylim

ylim = get (ca, "ylim")

z = peaks(50)

else zlim = get (ca, "zlim")