Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > b38d2da330d1936e5ab1307c039c4941 > files > 112

octave-doc-3.6.4-3.mga4.noarch.rpm

<html lang="en">
<head>
<title>Axis Configuration - GNU Octave</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GNU Octave">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Two_002dDimensional-Plots.html#Two_002dDimensional-Plots" title="Two-Dimensional Plots">
<link rel="next" href="Two_002ddimensional-Function-Plotting.html#Two_002ddimensional-Function-Plotting" title="Two-dimensional Function Plotting">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="Axis-Configuration"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Two_002ddimensional-Function-Plotting.html#Two_002ddimensional-Function-Plotting">Two-dimensional Function Plotting</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Two_002dDimensional-Plots.html#Two_002dDimensional-Plots">Two-Dimensional Plots</a>
<hr>
</div>

<h5 class="subsubsection">15.2.1.1 Axis Configuration</h5>

<p>The axis function may be used to change the axis limits of an existing
plot and various other axis properties, such as the aspect ratio and the
appearance of tic marks.

<!-- axis scripts/plot/axis.m -->
   <p><a name="doc_002daxis"></a>

<div class="defun">
&mdash; Function File:  <b>axis</b> ()<var><a name="index-axis-1189"></a></var><br>
&mdash; Function File:  <b>axis</b> ([<var>x_lo x_hi</var>])<var><a name="index-axis-1190"></a></var><br>
&mdash; Function File:  <b>axis</b> ([<var>x_lo x_hi y_lo y_hi</var>])<var><a name="index-axis-1191"></a></var><br>
&mdash; Function File:  <b>axis</b> ([<var>x_lo x_hi y_lo y_hi z_lo z_hi</var>])<var><a name="index-axis-1192"></a></var><br>
&mdash; Function File:  <b>axis</b> (<var>option</var>)<var><a name="index-axis-1193"></a></var><br>
&mdash; Function File:  <b>axis</b> (<var><small class="dots">...</small>, option</var>)<var><a name="index-axis-1194"></a></var><br>
&mdash; Function File:  <b>axis</b> (<var>h, <small class="dots">...</small></var>)<var><a name="index-axis-1195"></a></var><br>
&mdash; Function File: <var>limits</var> = <b>axis</b> ()<var><a name="index-axis-1196"></a></var><br>
<blockquote><p>Set axis limits for plots.

        <p>The argument <var>limits</var> should be a 2-, 4-, or 6-element vector.  The
first and second elements specify the lower and upper limits for the
x-axis.  The third and fourth specify the limits for the y-axis, and the
fifth and sixth specify the limits for the z-axis.

        <p>Without any arguments, <code>axis</code> turns autoscaling on.

        <p>With one output argument, <code>x = axis</code> returns the current axes.

        <p>The vector argument specifying limits is optional, and additional
string arguments may be used to specify various axis properties.  For
example,

     <pre class="example">          axis ([1, 2, 3, 4], "square");
</pre>
        <p class="noindent">forces a square aspect ratio, and

     <pre class="example">          axis ("tic", "labely");
</pre>
        <p class="noindent">turns tic marks on for all axes and tic mark labels on for the y-axis
only.

     <p class="noindent">The following options control the aspect ratio of the axes.

          <dl>
<dt>"square"<dd>Force a square aspect ratio.

          <br><dt>"equal"<dd>Force x distance to equal y-distance.

          <br><dt>"normal"<dd>Restore the balance. 
</dl>

     <p class="noindent">The following options control the way axis limits are interpreted.

          <dl>
<dt>"auto"<dd>Set the specified axes to have nice limits around the data
or all if no axes are specified.

          <br><dt>"manual"<dd>Fix the current axes limits.

          <br><dt>"tight"<dd>Fix axes to the limits of the data. 
</dl>

     <p class="noindent">The option <code>"image"</code> is equivalent to <code>"tight"</code> and
<code>"equal"</code>.

     <p class="noindent">The following options affect the appearance of tic marks.

          <dl>
<dt>"on"<dd>Turn tic marks and labels on for all axes.

          <br><dt>"off"<dd>Turn tic marks off for all axes.

          <br><dt>"tic[xyz]"<dd>Turn tic marks on for all axes, or turn them on for the
specified axes and off for the remainder.

          <br><dt>"label[xyz]"<dd>Turn tic labels on for all axes, or turn them on for the
specified axes and off for the remainder.

          <br><dt>"nolabel"<dd>Turn tic labels off for all axes. 
</dl>
        Note, if there are no tic marks for an axis, there can be no labels.

     <p class="noindent">The following options affect the direction of increasing values on
the axes.

          <dl>
<dt>"ij"<dd>Reverse y-axis, so lower values are nearer the top.

          <br><dt>"xy"<dd>Restore y-axis, so higher values are nearer the top. 
</dl>

        <p>If an axes handle is passed as the first argument, then operate on
this axes rather than the current axes. 
</p></blockquote></div>

   <p>Similarly the axis limits of the colormap can be changed with the caxis
function.

<!-- caxis scripts/plot/caxis.m -->
   <p><a name="doc_002dcaxis"></a>

<div class="defun">
&mdash; Function File:  <b>caxis</b> (<var>limits</var>)<var><a name="index-caxis-1197"></a></var><br>
&mdash; Function File:  <b>caxis</b> (<var>h, <small class="dots">...</small></var>)<var><a name="index-caxis-1198"></a></var><br>
<blockquote><p>Set color axis limits for plots.

        <p>The argument <var>limits</var> should be a 2-element vector specifying the
lower and upper limits to assign to the first and last value in the
colormap.  Values outside this range are clamped to the first and last
colormap entries.

        <p>If <var>limits</var> is 'auto', then automatic colormap scaling is applied,
whereas if <var>limits</var> is 'manual' the colormap scaling is set to manual.

        <p>Called without any arguments to current color axis limits are returned.

        <p>If an axes handle is passed as the first argument, then operate on
this axes rather than the current axes. 
</p></blockquote></div>

   <p>The <code>xlim</code>, <code>ylim</code>, and <code>zlim</code> functions may be used to
get or set individual axis limits.  Each has the same form.

   <p><a name="doc_002dylim"></a><a name="doc_002dzlim"></a><!-- xlim scripts/plot/xlim.m -->
<a name="doc_002dxlim"></a><!-- List other forms of function in documentation index -->
<a name="index-ylim-1199"></a><a name="index-zlim-1200"></a>

<div class="defun">
&mdash; Function File: <var>xl</var> = <b>xlim</b> ()<var><a name="index-xlim-1201"></a></var><br>
&mdash; Function File:  <b>xlim</b> (<var>xl</var>)<var><a name="index-xlim-1202"></a></var><br>
&mdash; Function File: <var>m</var> = <b>xlim</b> (<var>'mode'</var>)<var><a name="index-xlim-1203"></a></var><br>
&mdash; Function File:  <b>xlim</b> (<var>m</var>)<var><a name="index-xlim-1204"></a></var><br>
&mdash; Function File:  <b>xlim</b> (<var>h, <small class="dots">...</small></var>)<var><a name="index-xlim-1205"></a></var><br>
<blockquote><p>Get or set the limits of the x-axis of the current plot.  Called without
arguments <code>xlim</code> returns the x-axis limits of the current plot. 
If passed a two element vector <var>xl</var>, the limits of the x-axis are set
to this value.

        <p>The current mode for calculation of the x-axis can be returned with a
call <code>xlim ('mode')</code>, and can be either 'auto' or 'manual'.  The
current plotting mode can be set by passing either 'auto' or 'manual'
as the argument.

        <p>If passed a handle as the first argument, then operate on this handle
rather than the current axes handle. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002dylim.html#doc_002dylim">ylim</a>, <a href="doc_002dzlim.html#doc_002dzlim">zlim</a>, <a href="doc_002dset.html#doc_002dset">set</a>, <a href="doc_002dget.html#doc_002dget">get</a>, <a href="doc_002dgca.html#doc_002dgca">gca</a>. 
</p></blockquote></div>

   </body></html>