Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 641ebb3060c35990cc021d8f7aaf9aca > files > 101

octave-doc-5.1.0-7.1.mga7.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Axis Configuration (GNU Octave (version 5.1.0))</title>

<meta name="description" content="Axis Configuration (GNU Octave (version 5.1.0))">
<meta name="keywords" content="Axis Configuration (GNU Octave (version 5.1.0))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Two_002dDimensional-Plots.html#Two_002dDimensional-Plots" rel="up" title="Two-Dimensional Plots">
<link href="Two_002ddimensional-Function-Plotting.html#Two_002ddimensional-Function-Plotting" rel="next" title="Two-dimensional Function Plotting">
<link href="Two_002dDimensional-Plots.html#Two_002dDimensional-Plots" rel="prev" title="Two-Dimensional Plots">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
<link rel="stylesheet" type="text/css" href="octave.css">


</head>

<body lang="en">
<a name="Axis-Configuration"></a>
<div class="header">
<p>
Next: <a href="Two_002ddimensional-Function-Plotting.html#Two_002ddimensional-Function-Plotting" accesskey="n" rel="next">Two-dimensional Function Plotting</a>, Up: <a href="Two_002dDimensional-Plots.html#Two_002dDimensional-Plots" accesskey="u" rel="up">Two-Dimensional Plots</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Axis-Configuration-1"></a>
<h4 class="subsubsection">15.2.1.1 Axis Configuration</h4>

<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.  By default, high level plotting functions such as
<code>plot</code> reset axes properties.  Any customization of properties, for
example by calling <code>axis</code>, <code>xlim</code>, etc., should happen after the plot
is done or, alternatively, after calling the <a href="Manipulation-of-Plot-Windows.html#XREFhold">hold function</a>.
</p>
<a name="XREFaxis"></a><dl>
<dt><a name="index-axis"></a><em></em> <strong>axis</strong> <em>()</em></dt>
<dt><a name="index-axis-1"></a><em></em> <strong>axis</strong> <em>([<var>x_lo</var> <var>x_hi</var>])</em></dt>
<dt><a name="index-axis-2"></a><em></em> <strong>axis</strong> <em>([<var>x_lo</var> <var>x_hi</var> <var>y_lo</var> <var>y_hi</var>])</em></dt>
<dt><a name="index-axis-3"></a><em></em> <strong>axis</strong> <em>([<var>x_lo</var> <var>x_hi</var> <var>y_lo</var> <var>y_hi</var> <var>z_lo</var> <var>z_hi</var>])</em></dt>
<dt><a name="index-axis-4"></a><em></em> <strong>axis</strong> <em>([<var>x_lo</var> <var>x_hi</var> <var>y_lo</var> <var>y_hi</var> <var>z_lo</var> <var>z_hi</var> <var>c_lo</var> <var>c_hi</var>])</em></dt>
<dt><a name="index-axis-5"></a><em></em> <strong>axis</strong> <em>(<var>option</var>)</em></dt>
<dt><a name="index-axis-6"></a><em></em> <strong>axis</strong> <em>(<var>option1</var>, <var>option2</var>, &hellip;)</em></dt>
<dt><a name="index-axis-7"></a><em></em> <strong>axis</strong> <em>(<var>hax</var>, &hellip;)</em></dt>
<dt><a name="index-axis-8"></a><em><var>limits</var> =</em> <strong>axis</strong> <em>()</em></dt>
<dd><p>Set axis limits and appearance.
</p>
<p>The argument <var>limits</var> should be a 2-, 4-, 6-, or 8-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, the fifth
and sixth specify the limits for the z-axis, and the seventh and eighth
specify the limits for the color axis.  The special values -Inf and Inf may
be used to indicate that the limit should be automatically computed based
on the data in the axes.
</p>
<p>Without any arguments, <code>axis</code> turns autoscaling on.
</p>
<p>With one output argument, <code><var>limits</var> = axis</code> returns the current
axis limits.
</p>
<p>The vector argument specifying limits is optional, and additional string
arguments may be used to specify various axis properties.
</p>
<p>The following options control the aspect ratio of the axes.
</p>
<dl compact="compact">
<dt><code>&quot;square&quot;</code></dt>
<dd><p>Force a square axis aspect ratio.
</p>
</dd>
<dt><code>&quot;equal&quot;</code></dt>
<dd><p>Force x-axis unit distance to equal y-axis (and z-axis) unit distance.
</p>
</dd>
<dt><code>&quot;normal&quot;</code></dt>
<dd><p>Restore default aspect ratio.
</p></dd>
</dl>

<p>The following options control the way axis limits are interpreted.
</p>
<dl compact="compact">
<dt><code>&quot;auto&quot;</code></dt>
<dt><code>&quot;auto[xyz]&quot;</code></dt>
<dd><p>Set the specified axes to have nice limits around the data or all if no
axes are specified.
</p>
</dd>
<dt><code>&quot;manual&quot;</code></dt>
<dd><p>Fix the current axes limits.
</p>
</dd>
<dt><code>&quot;tight&quot;</code></dt>
<dd><p>Fix axes to the limits of the data.
</p>
</dd>
<dt><code>&quot;image&quot;</code></dt>
<dd><p>Equivalent to <code>&quot;tight&quot;</code> and <code>&quot;equal&quot;</code>.
</p>
</dd>
<dt><code>&quot;vis3d&quot;</code></dt>
<dd><p>Set aspect ratio modes to <code>&quot;manual&quot;</code> for rotation without stretching.
</p></dd>
</dl>

<p>The following options affect the appearance of tick marks.
</p>
<dl compact="compact">
<dt><code>&quot;tic[xyz]&quot;</code></dt>
<dd><p>Turn tick marks on for all axes, or turn them on for the specified axes and
off for the remainder.
</p>
</dd>
<dt><code>&quot;label[xyz]&quot;</code></dt>
<dd><p>Turn tick labels on for all axes, or turn them on for the specified axes
and off for the remainder.
</p>
</dd>
<dt><code>&quot;nolabel&quot;</code></dt>
<dd><p>Turn tick labels off for all axes.
</p></dd>
</dl>

<p>Note: If there are no tick marks for an axes then there can be no labels.
</p>
<p>The following options affect the direction of increasing values on the axes.
</p>
<dl compact="compact">
<dt><code>&quot;xy&quot;</code></dt>
<dd><p>Default y-axis, larger values are near the top.
</p>
</dd>
<dt><code>&quot;ij&quot;</code></dt>
<dd><p>Reverse y-axis, smaller values are near the top.
</p></dd>
</dl>

<p>The following options affects the visibility of the axes.
</p>
<dl compact="compact">
<dt><code>&quot;on&quot;</code></dt>
<dd><p>Make the axes visible.
</p>
</dd>
<dt><code>&quot;off&quot;</code></dt>
<dd><p>Hide the axes.
</p></dd>
</dl>

<p>If the first argument <var>hax</var> is an axes handle, then operate on this
axes rather than the current axes returned by <code>gca</code>.
</p>
<p>Example 1: set X/Y limits and force a square aspect ratio
</p>
<div class="example">
<pre class="example">axis ([1, 2, 3, 4], &quot;square&quot;);
</pre></div>

<p>Example 2: enable tick marks on all axes,
           enable tick mark labels only on the y-axis
</p>
<div class="example">
<pre class="example">axis (&quot;tic&quot;, &quot;labely&quot;);
</pre></div>


<p><strong>See also:</strong> <a href="#XREFxlim">xlim</a>, <a href="#XREFylim">ylim</a>, <a href="#XREFzlim">zlim</a>, <a href="#XREFcaxis">caxis</a>, <a href="Aspect-Ratio.html#XREFdaspect">daspect</a>, <a href="Aspect-Ratio.html#XREFpbaspect">pbaspect</a>, <a href="Plot-Annotations.html#XREFbox">box</a>, <a href="Plot-Annotations.html#XREFgrid">grid</a>.
</p></dd></dl>


<p>Similarly the axis limits of the colormap can be changed with the caxis
function.
</p>
<a name="XREFcaxis"></a><dl>
<dt><a name="index-caxis"></a><em></em> <strong>caxis</strong> <em>([cmin cmax])</em></dt>
<dt><a name="index-caxis-1"></a><em></em> <strong>caxis</strong> <em>(&quot;auto&quot;)</em></dt>
<dt><a name="index-caxis-2"></a><em></em> <strong>caxis</strong> <em>(&quot;manual&quot;)</em></dt>
<dt><a name="index-caxis-3"></a><em></em> <strong>caxis</strong> <em>(<var>hax</var>, &hellip;)</em></dt>
<dt><a name="index-caxis-4"></a><em><var>limits</var> =</em> <strong>caxis</strong> <em>()</em></dt>
<dd><p>Query or set color axis limits for plots.
</p>
<p>The limits argument should be a 2-element vector specifying the lower and
upper limits to assign to the first and last value in the colormap.  Data
values outside this range are clamped to the first and last colormap
entries.
</p>
<p>If the <code>&quot;auto&quot;</code> option is given then automatic colormap limits are
applied.  The automatic algorithm sets <var>cmin</var> to the minimum data value
and <var>cmax</var> to the maximum data value.  If <code>&quot;manual&quot;</code> is specified
then the <code>&quot;climmode&quot;</code> property is set to <code>&quot;manual&quot;</code> and the
numeric values in the <code>&quot;clim&quot;</code> property are used for limits.
</p>
<p>If the first argument <var>hax</var> is an axes handle, then operate on
this axes rather than the current axes returned by <code>gca</code>.
</p>
<p>Called without arguments the current color axis limits are returned.
</p>
<p>Programming Note: The color axis affects the display of image, patch, and
surface graphics objects, but <strong>only</strong> if the <code>&quot;cdata&quot;</code> property
has indexed data and the <code>&quot;cdatamapping&quot;</code> property is set to
<code>&quot;scaled&quot;</code>.  Graphic objects with true color <code>cdata</code>, or
<code>&quot;direct&quot;</code> <code>cdatamapping</code> are not affected.
</p>
<p><strong>See also:</strong> <a href="Representing-Images.html#XREFcolormap">colormap</a>, <a href="#XREFaxis">axis</a>.
</p></dd></dl>


<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="XREFylim"></a><a name="XREFzlim"></a><a name="index-ylim"></a>
<a name="index-zlim"></a>
<a name="XREFxlim"></a><dl>
<dt><a name="index-xlim"></a><em><var>xlimits</var> =</em> <strong>xlim</strong> <em>()</em></dt>
<dt><a name="index-xlim-1"></a><em><var>xmode</var> =</em> <strong>xlim</strong> <em>(&quot;mode&quot;)</em></dt>
<dt><a name="index-xlim-2"></a><em></em> <strong>xlim</strong> <em>([<var>x_lo</var> <var>x_hi</var>])</em></dt>
<dt><a name="index-xlim-3"></a><em></em> <strong>xlim</strong> <em>(&quot;auto&quot;)</em></dt>
<dt><a name="index-xlim-4"></a><em></em> <strong>xlim</strong> <em>(&quot;manual&quot;)</em></dt>
<dt><a name="index-xlim-5"></a><em></em> <strong>xlim</strong> <em>(<var>hax</var>, &hellip;)</em></dt>
<dd><p>Query or set the limits of the x-axis for the current plot.
</p>
<p>Called without arguments <code>xlim</code> returns the x-axis limits of the
current plot.
</p>
<p>With the input query <code>&quot;mode&quot;</code>, return the current x-limit calculation
mode which is either <code>&quot;auto&quot;</code> or <code>&quot;manual&quot;</code>.
</p>
<p>If passed a 2-element vector [<var>x_lo</var> <var>x_hi</var>], the limits of the
x-axis are set to these values and the mode is set to <code>&quot;manual&quot;</code>.
The special values -Inf and Inf can be used to indicate that either
the lower axis limit or upper axis limit should be automatically calculated.
</p>
<p>The current plotting mode can be changed by using either <code>&quot;auto&quot;</code>
or <code>&quot;manual&quot;</code> as the argument.
</p>
<p>If the first argument <var>hax</var> is an axes handle, then operate on
this axes rather than the current axes returned by <code>gca</code>.
</p>
<p>Programming Note: The <code>xlim</code> function operates by modifying the
<code>&quot;xlim&quot;</code> and <code>&quot;xlimmode&quot;</code> properties of an axes object.  These
properties can be directly inspected and altered with <code>get</code>/<code>set</code>.
</p>
<p><strong>See also:</strong> <a href="#XREFylim">ylim</a>, <a href="#XREFzlim">zlim</a>, <a href="#XREFaxis">axis</a>, <a href="Graphics-Objects.html#XREFset">set</a>, <a href="Graphics-Objects.html#XREFget">get</a>, <a href="Graphics-Objects.html#XREFgca">gca</a>.
</p></dd></dl>


<p>The <code>xticks</code>, <code>yticks</code>, <code>zticks</code>, <code>rticks</code>, and
<code>thetaticks</code> functions may be used to get or set the tick mark locations
and modes on the respective axis.  Each has the same form, although mode
options are not currently available for <code>rticks</code>, and <code>thetaticks</code>.
</p>
<a name="XREFyticks"></a><a name="XREFzticks"></a><a name="XREFrticks"></a><a name="XREFthetaticks"></a><a name="index-yticks"></a>
<a name="index-zticks"></a>
<a name="index-rticks"></a>
<a name="index-thetaticks"></a>
<a name="XREFxticks"></a><dl>
<dt><a name="index-xticks"></a><em><var>tickval</var> =</em> <strong>xticks</strong></dt>
<dt><a name="index-xticks-1"></a><em><var>mode</var> =</em> <strong>xticks</strong> <em>(&quot;mode&quot;)</em></dt>
<dt><a name="index-xticks-2"></a><em></em> <strong>xticks</strong> <em>(<var>tickval</var>)</em></dt>
<dt><a name="index-xticks-3"></a><em></em> <strong>xticks</strong> <em>(&quot;auto&quot;)</em></dt>
<dt><a name="index-xticks-4"></a><em></em> <strong>xticks</strong> <em>(&quot;manual&quot;)</em></dt>
<dt><a name="index-xticks-5"></a><em>&hellip; =</em> <strong>xticks</strong> <em>(<var>hax</var>, &hellip;)</em></dt>
<dd><p>Query or set the tick values on the x-axis of the current axis.
</p>
<p>When called without an argument, return the current tick locations as
specified in the <code>&quot;xtick&quot;</code> axes property.  These locations can be
changed by calling <code>xticks</code> with a vector of tick values.  Note:
ascending order is not required.
</p>
<p>When called with argument <code>&quot;mode&quot;</code>, <code>xticks</code> returns the current
value of the axes property <code>&quot;xtickmode&quot;</code>.  This property can be
changed by calling <code>xticks</code> with either <code>&quot;auto&quot;</code> (algorithm
determines tick positions) or <code>&quot;manual&quot;</code> (tick values remain fixed
regardless of axes resizing or rotation).  Note: Specifying xtick values
will also set the property <code>&quot;xtickmode&quot;</code> to <code>&quot;manual&quot;</code>.
</p>
<p>If the first argument <var>hax</var> is an axes handle, then operate on
this axis rather than the current axes returned by <code>gca</code>.
</p>
<p>Requesting a return value when calling <code>xticks</code> to set a property value
will result in an error.
</p>

<p><strong>See also:</strong> <a href="#XREFxticklabels">xticklabels</a>, <a href="#XREFyticks">yticks</a>, <a href="#XREFzticks">zticks</a>, <a href="#XREFrticks">rticks</a>, <a href="#XREFthetaticks">thetaticks</a>, <a href="Graphics-Objects.html#XREFget">get</a>, <a href="Graphics-Objects.html#XREFset">set</a>.
</p></dd></dl>


<p>The <code>xticklabels</code>, <code>yticklabels</code>, and <code>zticklabels</code> functions
may be used to get or set the label assigned to each tick location and the
labeling mode on the respective axis.  Each has the same form.
</p>
<a name="XREFyticklabels"></a><a name="XREFzticklabels"></a><a name="index-yticklabels"></a>
<a name="index-zticklabels"></a>
<a name="XREFxticklabels"></a><dl>
<dt><a name="index-xticklabels"></a><em><var>tickval</var> =</em> <strong>xticklabels</strong></dt>
<dt><a name="index-xticklabels-1"></a><em><var>mode</var> =</em> <strong>xticklabels</strong> <em>(&quot;mode&quot;)</em></dt>
<dt><a name="index-xticklabels-2"></a><em></em> <strong>xticklabels</strong> <em>(<var>tickval</var>)</em></dt>
<dt><a name="index-xticklabels-3"></a><em></em> <strong>xticklabels</strong> <em>(&quot;auto&quot;)</em></dt>
<dt><a name="index-xticklabels-4"></a><em></em> <strong>xticklabels</strong> <em>(&quot;manual&quot;)</em></dt>
<dt><a name="index-xticklabels-5"></a><em>&hellip; =</em> <strong>xticklabels</strong> <em>(<var>hax</var>, &hellip;)</em></dt>
<dd><p>Query or set the tick labels on the x-axis of the current axis.
</p>
<p>When called without an argument, return a cell array of strings of the
current tick labels as specified in the <code>&quot;xticklabel&quot;</code> axes property.
These labels can be changed by calling <code>xticklabels</code> with a cell array
of strings.  Note: a vector of numbers will be mapped to a cell array of
strings.  If fewer labels are specified than the current number of ticks,
blank labels will be appended to the array.
</p>
<p>When called with argument <code>&quot;mode&quot;</code>, <code>xticklabels</code> returns the
current value of the axes property <code>&quot;xticklabelmode&quot;</code>.  This property
can be changed by calling <code>xticklabels</code> with either <code>&quot;auto&quot;</code>
(algorithm determines tick labels) or <code>&quot;manual&quot;</code> (tick labels remain
fixed).  Note: Specifying xticklabel values will also set the
<code>&quot;xticklabelmode&quot;</code> and <code>&quot;xticks&quot;</code> properties to
<code>&quot;manual&quot;</code>.
</p>
<p>If the first argument <var>hax</var> is an axes handle, then operate on
this axis rather than the current axes returned by <code>gca</code>.
</p>
<p>Requesting a return value when calling <code>xticklabels</code> to set a property
value will result in an error.
</p>

<p><strong>See also:</strong> <a href="#XREFxticks">xticks</a>, <a href="#XREFyticklabels">yticklabels</a>, <a href="#XREFzticklabels">zticklabels</a>, <a href="Graphics-Objects.html#XREFget">get</a>, <a href="Graphics-Objects.html#XREFset">set</a>.
</p></dd></dl>


<hr>
<div class="header">
<p>
Next: <a href="Two_002ddimensional-Function-Plotting.html#Two_002ddimensional-Function-Plotting" accesskey="n" rel="next">Two-dimensional Function Plotting</a>, Up: <a href="Two_002dDimensional-Plots.html#Two_002dDimensional-Plots" accesskey="u" rel="up">Two-Dimensional Plots</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>