(octave.info)Axis Configuration
15.2.1.1 Axis Configuration
...........................
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 ()
-- : axis ([X_LO X_HI])
-- : axis ([X_LO X_HI Y_LO Y_HI])
-- : axis ([X_LO X_HI Y_LO Y_HI Z_LO Z_HI])
-- : axis ([X_LO X_HI Y_LO Y_HI Z_LO Z_HI C_LO C_HI])
-- : axis (OPTION)
-- : axis (OPTION1, OPTION2, ...)
-- : axis (HAX, ...)
-- : LIMITS = axis ()
Set axis limits and appearance.
The argument LIMITS 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.
Without any arguments, ‘axis’ turns autoscaling on.
With one output argument, ‘LIMITS = axis’ returns the current axis
limits.
The vector argument specifying limits is optional, and additional
string arguments may be used to specify various axis properties.
The following options control the aspect ratio of the axes.
"square"
Force a square axis aspect ratio.
"equal"
Force x-axis unit distance to equal y-axis (and z-axis) unit
distance.
"normal"
Restore default aspect ratio.
The following options control the way axis limits are interpreted.
"auto"
"auto[xyz]"
Set the specified axes to have nice limits around the data or
all if no axes are specified.
"manual"
Fix the current axes limits.
"tight"
Fix axes to the limits of the data.
"image"
Equivalent to "tight" and "equal".
"vis3d"
Set aspect ratio modes to "manual" for rotation without
stretching.
The following options affect the appearance of tick marks.
"tic[xyz]"
Turn tick marks on for all axes, or turn them on for the
specified axes and off for the remainder.
"label[xyz]"
Turn tick labels on for all axes, or turn them on for the
specified axes and off for the remainder.
"nolabel"
Turn tick labels off for all axes.
Note: If there are no tick marks for an axes then there can be no
labels.
The following options affect the direction of increasing values on
the axes.
"xy"
Default y-axis, larger values are near the top.
"ij"
Reverse y-axis, smaller values are near the top.
The following options affects the visibility of the axes.
"on"
Make the axes visible.
"off"
Hide the axes.
If the first argument HAX is an axes handle, then operate on this
axes rather than the current axes returned by ‘gca’.
Example 1: set X/Y limits and force a square aspect ratio
axis ([1, 2, 3, 4], "square");
Example 2: enable tick marks on all axes, enable tick mark labels
only on the y-axis
axis ("tic", "labely");
See also: Note: xlim, Note: ylim, *note zlim:
XREFzlim, Note: caxis, Note: daspect, Note:
pbaspect, Note: box, Note: grid.
Similarly the axis limits of the colormap can be changed with the
caxis function.
-- : caxis ([cmin cmax])
-- : caxis ("auto")
-- : caxis ("manual")
-- : caxis (HAX, ...)
-- : LIMITS = caxis ()
Query or set color axis limits for plots.
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.
If the "auto" option is given then automatic colormap limits are
applied. The automatic algorithm sets CMIN to the minimum data
value and CMAX to the maximum data value. If "manual" is specified
then the "climmode" property is set to "manual" and the numeric
values in the "clim" property are used for limits.
If the first argument HAX is an axes handle, then operate on this
axes rather than the current axes returned by ‘gca’.
Called without arguments the current color axis limits are
returned.
Programming Note: The color axis affects the display of image,
patch, and surface graphics objects, but *only* if the "cdata"
property has indexed data and the "cdatamapping" property is set to
"scaled". Graphic objects with true color ‘cdata’, or "direct"
‘cdatamapping’ are not affected.
See also: Note: colormap, Note: axis.
The ‘xlim’, ‘ylim’, and ‘zlim’ functions may be used to get or set
individual axis limits. Each has the same form.
-- : XLIMITS = xlim ()
-- : XMODE = xlim ("mode")
-- : xlim ([X_LO X_HI])
-- : xlim ("auto")
-- : xlim ("manual")
-- : xlim (HAX, ...)
Query or set the limits of the x-axis for the current plot.
Called without arguments ‘xlim’ returns the x-axis limits of the
current plot.
With the input query "mode", return the current x-limit calculation
mode which is either "auto" or "manual".
If passed a 2-element vector [X_LO X_HI], the limits of the x-axis
are set to these values and the mode is set to "manual". 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.
The current plotting mode can be changed by using either "auto" or
"manual" as the argument.
If the first argument HAX is an axes handle, then operate on this
axes rather than the current axes returned by ‘gca’.
Programming Note: The ‘xlim’ function operates by modifying the
"xlim" and "xlimmode" properties of an axes object. These
properties can be directly inspected and altered with ‘get’/‘set’.
See also: Note: ylim, Note: zlim, *note axis:
XREFaxis, Note: set, Note: get, *note gca:
XREFgca.
The ‘xticks’, ‘yticks’, ‘zticks’, ‘rticks’, and ‘thetaticks’
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 ‘rticks’, and ‘thetaticks’.
-- : TICKVAL = xticks
-- : MODE = xticks ("mode")
-- : xticks (TICKVAL)
-- : xticks ("auto")
-- : xticks ("manual")
-- : ... = xticks (HAX, ...)
Query or set the tick values on the x-axis of the current axis.
When called without an argument, return the current tick locations
as specified in the "xtick" axes property. These locations can be
changed by calling ‘xticks’ with a vector of tick values. Note:
ascending order is not required.
When called with argument "mode", ‘xticks’ returns the current
value of the axes property "xtickmode". This property can be
changed by calling ‘xticks’ with either "auto" (algorithm
determines tick positions) or "manual" (tick values remain fixed
regardless of axes resizing or rotation). Note: Specifying xtick
values will also set the property "xtickmode" to "manual".
If the first argument HAX is an axes handle, then operate on this
axis rather than the current axes returned by ‘gca’.
Requesting a return value when calling ‘xticks’ to set a property
value will result in an error.
See also: Note: xticklabels, *note yticks:
XREFyticks, Note: zticks, Note: rticks,
Note: thetaticks, Note: get, *note set:
XREFset.
The ‘xticklabels’, ‘yticklabels’, and ‘zticklabels’ 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.
-- : TICKVAL = xticklabels
-- : MODE = xticklabels ("mode")
-- : xticklabels (TICKVAL)
-- : xticklabels ("auto")
-- : xticklabels ("manual")
-- : ... = xticklabels (HAX, ...)
Query or set the tick labels on the x-axis of the current axis.
When called without an argument, return a cell array of strings of
the current tick labels as specified in the "xticklabel" axes
property. These labels can be changed by calling ‘xticklabels’
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.
When called with argument "mode", ‘xticklabels’ returns the current
value of the axes property "xticklabelmode". This property can be
changed by calling ‘xticklabels’ with either "auto" (algorithm
determines tick labels) or "manual" (tick labels remain fixed).
Note: Specifying xticklabel values will also set the
"xticklabelmode" and "xticks" properties to "manual".
If the first argument HAX is an axes handle, then operate on this
axis rather than the current axes returned by ‘gca’.
Requesting a return value when calling ‘xticklabels’ to set a
property value will result in an error.
See also: Note: xticks, *note yticklabels:
XREFyticklabels, Note: zticklabels, *note get:
XREFget, Note: set.
automatically generated by info2www version 1.2.2.9