# HG changeset patch # User Rik # Date 1371948052 25200 # Node ID 64e7bb01fce290be1693e3d8ab08313958dc7b3b # Parent 81e041f5633ad3b617455ed4c3e4668f3eb953b5 doc: Improve documentation for 2-D plot functions * doc/interpreter/plot.txi: Rewrite documentation around get/set. * libinterp/interpfcn/graphics.cc(Fget, Fset): Add seealso links. Add additional calling forms for get(). * scripts/plot/bar.m, scripts/plot/barh.m, scripts/plot/comet.m, scripts/plot/comet3.m, scripts/plot/contour.m, scripts/plot/contour3.m, scripts/plot/contourc.m, scripts/plot/contourf.m, scripts/plot/errorbar.m, scripts/plot/gca.m, scripts/plot/gcf.m, scripts/plot/gco.m, scripts/plot/ishghandle.m, scripts/plot/loglogerr.m, scripts/plot/pareto.m, scripts/plot/pcolor.m, scripts/plot/pie.m, scripts/plot/pie3.m, scripts/plot/plotmatrix.m, scripts/plot/plotyy.m, scripts/plot/polar.m, scripts/plot/quiver.m, scripts/plot/quiver3.m, scripts/plot/rose.m, scripts/plot/scatter.m, scripts/plot/semilogxerr.m, scripts/plot/semilogyerr.m, scripts/plot/sombrero.m, scripts/plot/stairs.m, scripts/plot/stem.m, scripts/plot/stem3.m: Improve docstrings. diff --git a/doc/interpreter/plot.txi b/doc/interpreter/plot.txi --- a/doc/interpreter/plot.txi +++ b/doc/interpreter/plot.txi @@ -949,21 +949,21 @@ @code{line}, @code{text}, @code{patch}, @code{surface}, and @code{image} objects. -Graphics handles may be distinguished from function handles (@ref{Function -Handles}) by means of the function @code{ishandle}. @code{ishandle} returns -true if its argument is a handle of a graphics object. In addition, the figure -object may be tested using @code{isfigure}. @code{isfigure} returns true only -if its argument is a handle of a figure. ishghandle() is synonymous with -ishandle(). The @code{whos} function can be used to show the object type of -each currently defined graphics handle. (Note: this is not true today, but it -is, I hope, considered an error in whos. It may be better to have whos just -show graphics_handle as the class, and provide a new function which, given a +Graphics handles may be distinguished from function handles +(@ref{Function Handles}) by means of the function @code{ishandle}. +@code{ishandle} returns true if its argument is a handle of a graphics object. +In addition, the figure object may be tested using @code{isfigure}. +@code{isfigure} returns true only if its argument is a handle of a figure. The +@code{whos} function can be used to show the object type of each currently +defined graphics handle. (Note: this is not true today, but it is, I hope, +considered an error in whos. It may be better to have whos just show +graphics_handle as the class, and provide a new function which, given a graphics handle, returns its object type. This could generalize the ishandle() functions and, in fact, replace them.) -The @code{get} and @code{set} commands are -used to obtain and set the values of properties of graphics objects. In -addition, the @code{get} command may be used to obtain property names. +The @code{get} and @code{set} commands are used to obtain and set the values of +properties of graphics objects. In addition, the @code{get} command may be +used to obtain property names. For example, the property "type" of the graphics object pointed to by the graphics handle h may be displayed by: @@ -1037,7 +1037,7 @@ @cindex root figure graphics object @cindex graphics object, root figure the top level of the hierarchy and the parent of all figure objects. -The @code{handle} index of the root figure is 0. +The handle index of the root figure is 0. @item figure @cindex figure graphics object diff --git a/libinterp/interpfcn/graphics.cc b/libinterp/interpfcn/graphics.cc --- a/libinterp/interpfcn/graphics.cc +++ b/libinterp/interpfcn/graphics.cc @@ -8574,6 +8574,7 @@ elements of @var{pv} will be set in all handles in @var{h} independent of\n\ the dimensions of @var{pv}.\n\ @end itemize\n\ +@seealso{get}\n\ @end deftypefn") { gh_manager::auto_lock guard; @@ -8681,11 +8682,13 @@ DEFUN (get, args, , "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} get (@var{h}, @var{p})\n\ -Return the named property @var{p} from the graphics handle @var{h}.\n\ -If @var{p} is omitted, return the complete property list for @var{h}.\n\ -If @var{h} is a vector, return a cell array including the property\n\ +@deftypefn {Built-in Function} {@var{val} =} get (@var{h})\n\ +@deftypefnx {Built-in Function} {@var{val} =} get (@var{h}, @var{p})\n\ +Return the value of the named property @var{p} from the graphics handle\n\ +@var{h}. If @var{p} is omitted, return the complete property list for\n\ +@var{h}. If @var{h} is a vector, return a cell array including the property\n\ values or lists respectively.\n\ +@seealso{set}\n\ @end deftypefn") { gh_manager::auto_lock guard; diff --git a/scripts/plot/bar.m b/scripts/plot/bar.m --- a/scripts/plot/bar.m +++ b/scripts/plot/bar.m @@ -21,8 +21,8 @@ ## @deftypefnx {Function File} {} bar (@var{y}) ## @deftypefnx {Function File} {} bar (@var{x}, @var{y}, @var{w}) ## @deftypefnx {Function File} {} bar (@var{x}, @var{y}, @var{w}, @var{style}) +## @deftypefnx {Function File} {} bar (@var{h}, @dots{}) ## @deftypefnx {Function File} {@var{h} =} bar (@dots{}, @var{prop}, @var{val}) -## @deftypefnx {Function File} {} bar (@var{h}, @dots{}) ## Produce a bar graph from two vectors of x-y data. ## ## If only one argument is given, @var{y}, it is taken as a vector of y-values @@ -36,6 +36,9 @@ ## argument, which can take the values @code{"grouped"} (the default), ## or @code{"stacked"}. ## +## Passing the optional input handle @var{h} will draw the resulting plot +## in the specified handle. +## ## The optional return value @var{h} is a handle to the created "bar series" ## object with one handle per column of the variable @var{y}. This ## series allows common elements of the group of bar series objects to @@ -52,8 +55,6 @@ ## @noindent ## changes the position on the base of all of the bar series. ## -## The optional input handle @var{h} allows an axis handle to be passed. -## ## The bar graph's appearance may be modified by specifying property/value ## pairs. The following example modifies the face and edge colors. ## diff --git a/scripts/plot/barh.m b/scripts/plot/barh.m --- a/scripts/plot/barh.m +++ b/scripts/plot/barh.m @@ -21,8 +21,9 @@ ## @deftypefnx {Function File} {} barh (@var{y}) ## @deftypefnx {Function File} {} barh (@var{x}, @var{y}, @var{w}) ## @deftypefnx {Function File} {} barh (@var{x}, @var{y}, @var{w}, @var{style}) -## @deftypefnx {Function File} {@var{h} =} barh (@dots{}, @var{prop}, @var{val}) +## @deftypefnx {Function File} {} barh (@dots{}, @var{prop}, @var{val}) ## @deftypefnx {Function File} {} barh (@var{h}, @dots{}) +## @deftypefnx {Function File} {@var{h} =} barh (@dots{}) ## Produce a horizontal bar graph from two vectors of x-y data. ## ## If only one argument is given, it is taken as a vector of y-values @@ -36,7 +37,9 @@ ## argument, which can take the values @code{"grouped"} (the default), ## or @code{"stacked"}. ## -## The optional input handle @var{h} allows an axis handle to be passed. +## Passing the optional input handle @var{h} will draw the resulting plot +## in the specified handle. +## ## Properties of the patch graphics object can be changed using ## @var{prop}, @var{val} pairs. ## diff --git a/scripts/plot/comet.m b/scripts/plot/comet.m --- a/scripts/plot/comet.m +++ b/scripts/plot/comet.m @@ -20,17 +20,18 @@ ## @deftypefn {Function File} {} comet (@var{y}) ## @deftypefnx {Function File} {} comet (@var{x}, @var{y}) ## @deftypefnx {Function File} {} comet (@var{x}, @var{y}, @var{p}) -## @deftypefnx {Function File} {} comet (@var{ax}, @dots{}) +## @deftypefnx {Function File} {} comet (@var{hax}, @dots{}) ## Produce a simple comet style animation along the trajectory provided by -## the input coordinate vectors (@var{x}, @var{y}), where @var{x} will default -## to the indices of @var{y}. +## the input coordinate vectors (@var{x}, @var{y}). If @var{x} is not +## specified it defaults to the indices of @var{y}. ## ## The speed of the comet may be controlled by @var{p}, which represents the -## time which passes as the animation passes from one point to the next. The -## default for @var{p} is 0.1 seconds. +## time each point is displayed before moving to the next one. The default for +## @var{p} is 0.1 seconds. ## -## If @var{ax} is specified the animation is produced in that axis rather than -## the @code{gca}. +## If @var{hax} is specified the animation is produced in that axis rather than +## the current axis. +## @seealso{comet3} ## @end deftypefn ## Author: Ben Abbott bpabbott@mac.com diff --git a/scripts/plot/comet3.m b/scripts/plot/comet3.m --- a/scripts/plot/comet3.m +++ b/scripts/plot/comet3.m @@ -18,18 +18,20 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} comet3 (@var{z}) +## @deftypefnx {Function File} {} comet3 (@var{x}, @var{y}, @var{z}) ## @deftypefnx {Function File} {} comet3 (@var{x}, @var{y}, @var{z}, @var{p}) -## @deftypefnx {Function File} {} comet3 (@var{ax}, @dots{}) +## @deftypefnx {Function File} {} comet3 (@var{hax}, @dots{}) ## Produce a simple comet style animation along the trajectory provided by -## the input coordinate vectors (@var{x}, @var{y}), where @var{x} will default -## to the indices of @var{y}. +## the input coordinate vectors (@var{x}, @var{y}, @var{z}). If only @var{z} +## is specified then @var{x}, @var{y} default to the indices of @var{z}. ## ## The speed of the comet may be controlled by @var{p}, which represents the -## time which passes as the animation passes from one point to the next. The -## default for @var{p} is 0.1 seconds. +## time each point is displayed before moving tothe next one. The default for +## @var{p} is 0.1 seconds. ## -## If @var{ax} is specified the animation is produced in that axis rather than -## the @code{gca}. +## If @var{hax} is specified the animation is produced in that axis rather than +## the current axis. +## @seealso{comet} ## @end deftypefn ## Author: jwe diff --git a/scripts/plot/contour.m b/scripts/plot/contour.m --- a/scripts/plot/contour.m +++ b/scripts/plot/contour.m @@ -45,7 +45,7 @@ ## The optional input and output argument @var{h} allows an axis handle to ## be passed to @code{contour} and the handles to the contour objects to be ## returned. -## @seealso{contourc, patch, plot} +## @seealso{contourc, contourf, contour3, patch, plot} ## @end deftypefn ## Author: Shai Ayal diff --git a/scripts/plot/contour3.m b/scripts/plot/contour3.m --- a/scripts/plot/contour3.m +++ b/scripts/plot/contour3.m @@ -33,7 +33,7 @@ ## @example ## @group ## contour3 (peaks (19)); -## hold on +## hold on; ## surface (peaks (19), "facecolor", "none", "EdgeColor", "black"); ## colormap hot; ## @end group @@ -46,7 +46,7 @@ ## The optional input and output argument @var{h} allows an axis handle to ## be passed to @code{contour} and the handles to the contour objects to be ## returned. -## @seealso{contourc, patch, plot} +## @seealso{contourc, contour, contourf, patch, plot} ## @end deftypefn function [c, h] = contour3 (varargin) diff --git a/scripts/plot/contourc.m b/scripts/plot/contourc.m --- a/scripts/plot/contourc.m +++ b/scripts/plot/contourc.m @@ -17,12 +17,15 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {[@var{c}, @var{lev}] =} contourc (@var{x}, @var{y}, @var{z}, @var{vn}) +## @deftypefn {Function File} {[@var{c}, @var{lev}] =} contourc (@var{z}) +## @deftypefnx {Function File} {[@var{c}, @var{lev}] =} contourc (@var{z}, @var{vn}) +## @deftypefnx {Function File} {[@var{c}, @var{lev}] =} contourc (@var{x}, @var{y}, @var{z}) +## @deftypefnx {Function File} {[@var{c}, @var{lev}] =} contourc (@var{x}, @var{y}, @var{z}, @var{vn}) ## Compute isolines (contour lines) of the matrix @var{z}. -## Parameters @var{x}, @var{y} and @var{vn} are optional. +## Parameters @var{x}, @var{y}, and @var{vn} are optional. ## ## The return value @var{lev} is a vector of the contour levels. -## The return value @var{c} is a 2 by @var{n} matrix containing the +## The return value @var{c} is a 2x@var{n} matrix containing the ## contour lines in the following format ## ## @example @@ -37,9 +40,9 @@ ## length of @var{lenn}. ## ## If @var{x} and @var{y} are omitted they are taken as the row/column -## index of @var{z}. @var{vn} is either a scalar denoting the number of lines -## to compute or a vector containing the values of the lines. If only one -## value is wanted, set @code{@var{vn} = [val, val]}; +## indices of @var{z}. @var{vn} is either a scalar denoting the number of +## contour lines to compute or a vector containing the values of the lines. +## If only one value is desired, set @code{@var{vn} = [val, val]}; ## If @var{vn} is omitted it defaults to 10. ## ## For example: @@ -54,7 +57,7 @@ ## 2.0000 1.0000 2.0000 2.0000 2.0000 1.5000 ## @end group ## @end example -## @seealso{contour} +## @seealso{contour, contourf, contour3} ## @end deftypefn ## Author: Shai Ayal diff --git a/scripts/plot/contourf.m b/scripts/plot/contourf.m --- a/scripts/plot/contourf.m +++ b/scripts/plot/contourf.m @@ -18,33 +18,37 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {[@var{c}, @var{h}] =} contourf (@var{x}, @var{y}, @var{z}, @var{lvl}) -## @deftypefnx {Function File} {[@var{c}, @var{h}] =} contourf (@var{x}, @var{y}, @var{z}, @var{n}) -## @deftypefnx {Function File} {[@var{c}, @var{h}] =} contourf (@var{x}, @var{y}, @var{z}) -## @deftypefnx {Function File} {[@var{c}, @var{h}] =} contourf (@var{z}, @var{n}) -## @deftypefnx {Function File} {[@var{c}, @var{h}] =} contourf (@var{z}, @var{lvl}) -## @deftypefnx {Function File} {[@var{c}, @var{h}] =} contourf (@var{z}) -## @deftypefnx {Function File} {[@var{c}, @var{h}] =} contourf (@var{ax}, @dots{}) -## @deftypefnx {Function File} {[@var{c}, @var{h}] =} contourf (@dots{}, @var{"property"}, @var{val}) +## @deftypefn {Function File} {} contourf (@var{x}, @var{y}, @var{z}, @var{lvl}) +## @deftypefnx {Function File} {} contourf (@var{x}, @var{y}, @var{z}, @var{n}) +## @deftypefnx {Function File} {} contourf (@var{x}, @var{y}, @var{z}) +## @deftypefnx {Function File} {} contourf (@var{z}, @var{n}) +## @deftypefnx {Function File} {} contourf (@var{z}, @var{lvl}) +## @deftypefnx {Function File} {} contourf (@var{z}) +## @deftypefnx {Function File} {} contourf (@dots{}, @var{prop}, @var{val}) +## @deftypefnx {Function File} {} contourf (@var{hax}, @dots{}) +## @deftypefnx {Function File} {[@var{c}, @var{h}] =} contourf (@dots{}) ## Compute and plot filled contours of the matrix @var{z}. ## Parameters @var{x}, @var{y} and @var{n} or @var{lvl} are optional. ## +## If @var{x} and @var{y} are omitted they are taken as the row/column +## indices of @var{z}. @var{n} is a scalar denoting the number of contour +## lines to compute. Alternatively @var{lvl} is a vector containing the +## contour levels. If only one value (e.g., lvl0) is desired, set +## @var{lvl} to [lvl0, lvl0]. If both @var{n} or @var{lvl} are omitted +## a default value of 10 contour levels is assumed. +## +## The appearance of the plot can be customized by passing +## property/value pairs to the function. +## +## If provided, the filled contours are added to the axes object +## @var{hax} instead of the current axis. +## ## The return value @var{c} is a 2xn matrix containing the contour lines -## as described in the help to the contourc function. +## as described in the documentation on the @code{contourc} function. ## ## The return value @var{h} is handle-vector to the patch objects creating ## the filled contours. ## -## If @var{x} and @var{y} are omitted they are taken as the row/column -## index of @var{z}. @var{n} is a scalar denoting the number of lines -## to compute. Alternatively @var{lvl} is a vector containing the -## contour levels. If only one value (e.g., lvl0) is wanted, set -## @var{lvl} to [lvl0, lvl0]. If both @var{n} or @var{lvl} are omitted -## a default value of 10 contour level is assumed. -## -## If provided, the filled contours are added to the axes object -## @var{ax} instead of the current axis. -## ## The following example plots filled contours of the @code{peaks} ## function. ## @@ -54,7 +58,7 @@ ## contourf (x, y, z, -7:9) ## @end group ## @end example -## @seealso{contour, contourc, patch} +## @seealso{contourc, contour, contour3, patch} ## @end deftypefn ## Author: Kai Habel diff --git a/scripts/plot/errorbar.m b/scripts/plot/errorbar.m --- a/scripts/plot/errorbar.m +++ b/scripts/plot/errorbar.m @@ -17,7 +17,8 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {} errorbar (@var{args}) +## @deftypefn {Function File} {} errorbar (@var{args}) +## @deftypefnx {Function File} {@var{h} =} errorbar (@var{args}) ## This function produces two-dimensional plots with errorbars. Many ## different combinations of arguments are possible. The simplest form is ## diff --git a/scripts/plot/gca.m b/scripts/plot/gca.m --- a/scripts/plot/gca.m +++ b/scripts/plot/gca.m @@ -17,7 +17,7 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {} gca () +## @deftypefn {Function File} {@var{h} =} gca () ## Return a handle to the current axis object. If no axis object ## exists, create one and return its handle. The handle may then be ## used to examine or set properties of the axes. For example, @@ -32,7 +32,7 @@ ## @noindent ## creates an empty axes object, then changes its location and size in ## the figure window. -## @seealso{get, set} +## @seealso{gcf, gco, get, set} ## @end deftypefn ## Author: jwe diff --git a/scripts/plot/gcf.m b/scripts/plot/gcf.m --- a/scripts/plot/gcf.m +++ b/scripts/plot/gcf.m @@ -17,7 +17,7 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {} gcf () +## @deftypefn {Function File} {@var{h} =} gcf () ## Return the current figure handle. If a figure does not exist, create ## one and return its handle. The handle may then be used to examine or ## set properties of the figure. For example, @@ -34,7 +34,7 @@ ## plots a sine wave, finds the handle of the current figure, and then ## makes that figure invisible. Setting the visible property of the ## figure to @code{"on"} will cause it to be displayed again. -## @seealso{get, set} +## @seealso{gca, gco, get, set} ## @end deftypefn ## Author: jwe, Bill Denney diff --git a/scripts/plot/gco.m b/scripts/plot/gco.m --- a/scripts/plot/gco.m +++ b/scripts/plot/gco.m @@ -35,7 +35,7 @@ ## callback can be interrupted by another callback and the current object ## can be modified. ## -##@seealso{gcbo, gcf, gca} +##@seealso{gcbo, gcf, gca, get, set} ##@end deftypefn function h = gco () diff --git a/scripts/plot/ishghandle.m b/scripts/plot/ishghandle.m --- a/scripts/plot/ishghandle.m +++ b/scripts/plot/ishghandle.m @@ -18,7 +18,10 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} ishghandle (@var{h}) -## Return true if @var{h} is a graphics handle and false otherwise. +## Return true if @var{h} is a graphics handle and false otherwise. This +## function is equivalent to @code{ishandle} and is provided for compatibility +## with @sc{matlab}. +## @seealso{ishandle} ## @end deftypefn function retval = ishghandle (h) diff --git a/scripts/plot/loglogerr.m b/scripts/plot/loglogerr.m --- a/scripts/plot/loglogerr.m +++ b/scripts/plot/loglogerr.m @@ -17,10 +17,11 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {} loglogerr (@var{args}) +## @deftypefn {Function File} {} loglogerr (@var{args}) +## @deftypefnx {Function File} {@var{h} =} loglogerr (@var{args}) ## Produce two-dimensional plots on double logarithm axis with ## errorbars. Many different combinations of arguments are possible. -## The most used form is +## The most common form is ## ## @example ## loglogerr (@var{x}, @var{y}, @var{ey}, @var{fmt}) diff --git a/scripts/plot/pareto.m b/scripts/plot/pareto.m --- a/scripts/plot/pareto.m +++ b/scripts/plot/pareto.m @@ -38,7 +38,7 @@ ## ## The data are passed as @var{x} and the abscissa as @var{y}. If @var{y} is ## absent, then the abscissa are assumed to be @code{1 : length (@var{x})}. -## @var{y} can be a string array, a cell array of strings or a numerical +## @var{y} can be a string array, a cell array of strings, or a numerical ## vector. ## ## The optional return value @var{h} is a 2-element vector with a graphics @@ -55,6 +55,7 @@ ## pareto (Sold, Cheese); ## @end group ## @end example +## @seealso{bar, barh, pie, plot} ## @end deftypefn function h = pareto (varargin) diff --git a/scripts/plot/pcolor.m b/scripts/plot/pcolor.m --- a/scripts/plot/pcolor.m +++ b/scripts/plot/pcolor.m @@ -19,18 +19,15 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} pcolor (@var{x}, @var{y}, @var{c}) ## @deftypefnx {Function File} {} pcolor (@var{c}) -## Density plot for given matrices @var{x}, and @var{y} from @code{meshgrid} and -## a matrix @var{c} corresponding to the @var{x} and @var{y} coordinates of +## Produce a density plot for matrices @var{x} and @var{y} from @code{meshgrid},## and a matrix @var{c} corresponding to the @var{x} and @var{y} coordinates of ## the mesh's vertices. If @var{x} and @var{y} are vectors, then a typical -## vertex -## is (@var{x}(j), @var{y}(i), @var{c}(i,j)). Thus, columns of @var{c} +## vertex is (@var{x}(j), @var{y}(i), @var{c}(i,j)). Thus, columns of @var{c} ## correspond to different @var{x} values and rows of @var{c} correspond ## to different @var{y} values. ## ## The @code{colormap} is scaled to the extents of @var{c}. -## Limits may be placed on the color axis by the -## command @code{caxis}, or by setting the @code{clim} property of the -## parent axis. +## Limits may be placed on the color axis by the command @code{caxis}, or by +## setting the @code{clim} property of the parent axis. ## ## The face color of each cell of the mesh is determined by interpolating ## the values of @var{c} for the cell's vertices. Contrast this with @@ -42,7 +39,7 @@ ## "faceted", which renders a single color for each cell's face with the edge ## visible. ## -## @var{h} is the handle to the surface object. +## The optional return value @var{h} is a handle to the surface object. ## ## @seealso{caxis, contour, meshgrid, imagesc, shading} ## @end deftypefn diff --git a/scripts/plot/pie.m b/scripts/plot/pie.m --- a/scripts/plot/pie.m +++ b/scripts/plot/pie.m @@ -22,17 +22,17 @@ ## @deftypefnx {Function File} {} pie (@dots{}, @var{labels}) ## @deftypefnx {Function File} {} pie (@var{h}, @dots{}); ## @deftypefnx {Function File} {@var{h} =} pie (@dots{}); -## Produce a 2-D pie chart. +## Plot a 2-D pie chart. ## -## Called with a single vector argument, produces a pie chart of the -## elements in @var{x}, with the size of the slice determined by percentage -## size of the values of @var{x}. +## When called with a single vector argument, produce a pie chart of the +## elements in @var{x}. The size of the ith slice is the percentage that the +## element @var{x}i represents of the total sum of @var{x}. ## -## The variable @var{explode} is a vector of the same length as @var{x} that -## if non zero "explodes" the slice from the pie chart. +## The variable @var{explode} is a vector of the same length as @var{x} that, +## if non-zero, "explodes" the slice from the pie chart. ## -## If given @var{labels} is a cell array of strings of the same length as -## @var{x}, giving the labels of each of the slices of the pie chart. +## The optional input @var{labels} is a cell array of strings of the same +## length as @var{x} specifying the label for each slice. ## ## The optional return value @var{h} is a list of handles to the patch ## and text objects generating the plot. diff --git a/scripts/plot/pie3.m b/scripts/plot/pie3.m --- a/scripts/plot/pie3.m +++ b/scripts/plot/pie3.m @@ -23,17 +23,17 @@ ## @deftypefnx {Function File} {} pie3 (@dots{}, @var{labels}) ## @deftypefnx {Function File} {} pie3 (@var{h}, @dots{}); ## @deftypefnx {Function File} {@var{h} =} pie3 (@dots{}); -## Draw a 3-D pie chart. +## Plot a 3-D pie chart. ## ## Called with a single vector argument, produces a 3-D pie chart of the -## elements in @var{x}, with the size of the slice determined by percentage -## size of the values of @var{x}. +## elements in @var{x}. The size of the ith slice is the percentage that the +## element @var{x}i represents of the total sum of @var{x}. ## -## The variable @var{explode} is a vector of the same length as @var{x} that -## if non zero "explodes" the slice from the pie chart. +## The variable @var{explode} is a vector of the same length as @var{x} that, +## if non-zero, "explodes" the slice from the pie chart. ## -## If given @var{labels} is a cell array of strings of the same length as -## @var{x}, giving the labels of each of the slices of the pie chart. +## The optional input @var{labels} is a cell array of strings of the same +## length as @var{x} specifying the label for each slice. ## ## The optional return value @var{h} is a list of graphics handles to the patch, ## surface, and text objects generating the plot. diff --git a/scripts/plot/plotmatrix.m b/scripts/plot/plotmatrix.m --- a/scripts/plot/plotmatrix.m +++ b/scripts/plot/plotmatrix.m @@ -27,10 +27,10 @@ ## @code{plotmatrix} plots a set of axes corresponding to ## ## @example -## plot (@var{x} (:, i), @var{y} (:, j) +## plot (@var{x}(:, i), @var{y}(:, j)) ## @end example ## -## Given a single argument @var{x}, then this is equivalent to +## Given a single argument @var{x} this is equivalent to ## ## @example ## plotmatrix (@var{x}, @var{x}) @@ -38,7 +38,7 @@ ## ## @noindent ## except that the diagonal of the set of axes will be replaced with the -## histogram @code{hist (@var{x} (:, i))}. +## histogram @code{hist (@var{x}(:, i))}. ## ## The marker to use can be changed with the @var{style} argument, that is a ## string defining a marker in the same manner as the @code{plot} @@ -57,6 +57,7 @@ ## plotmatrix (randn (100, 3), "g+") ## @end example ## +## @seealso{plot} ## @end deftypefn function [h, ax, bigax, p, pax] = plotmatrix (varargin) diff --git a/scripts/plot/plotyy.m b/scripts/plot/plotyy.m --- a/scripts/plot/plotyy.m +++ b/scripts/plot/plotyy.m @@ -51,6 +51,7 @@ ## ylabel (ax(2), "Axis 2"); ## @end group ## @end example +## @seealso{plot} ## @end deftypefn function [Ax, H1, H2] = plotyy (varargin) diff --git a/scripts/plot/polar.m b/scripts/plot/polar.m --- a/scripts/plot/polar.m +++ b/scripts/plot/polar.m @@ -28,7 +28,7 @@ ## ## The optional return value @var{h} is a graphics handle to the created plot. ## -## @seealso{plot} +## @seealso{plot, rose, compass} ## @end deftypefn ## Author: jwe diff --git a/scripts/plot/quiver.m b/scripts/plot/quiver.m --- a/scripts/plot/quiver.m +++ b/scripts/plot/quiver.m @@ -41,7 +41,7 @@ ## in a similar manner to the line styles used with the @code{plot} command. ## If a marker is specified then markers at the grid points of the vectors are ## printed rather than arrows. If the argument "filled" is given then the -## markers as filled. +## markers are drawn filled. ## ## The optional return value @var{h} is a graphics handle to a quiver object. ## A quiver object regroups the components of the quiver plot (body, arrow, @@ -55,7 +55,7 @@ ## @end group ## @end example ## -## @seealso{plot} +## @seealso{quiver3, feather, plot} ## @end deftypefn function retval = quiver (varargin) diff --git a/scripts/plot/quiver3.m b/scripts/plot/quiver3.m --- a/scripts/plot/quiver3.m +++ b/scripts/plot/quiver3.m @@ -58,7 +58,7 @@ ## @end group ## @end example ## -## @seealso{plot} +## @seealso{quiver, plot} ## @end deftypefn function retval = quiver3 (varargin) diff --git a/scripts/plot/rose.m b/scripts/plot/rose.m --- a/scripts/plot/rose.m +++ b/scripts/plot/rose.m @@ -17,13 +17,14 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {} rose (@var{th}, @var{r}) +## @deftypefn {Function File} {} rose (@var{th}) +## @deftypefnx {Function File} {} rose (@var{th}, @var{r}) ## @deftypefnx {Function File} {} rose (@var{h}, @dots{}) ## @deftypefnx {Function File} {@var{h} =} rose (@dots{}) ## @deftypefnx {Function File} {[@var{r}, @var{th}] =} rose (@dots{}) ## -## Plot an angular histogram. With one vector argument @var{th}, plots the -## histogram with 20 angular bins. If @var{th} is a matrix, then each column +## Plot an angular histogram. With one vector argument, @var{th}, plot the +## histogram with 20 angular bins. If @var{th} is a matrix then each column ## of @var{th} produces a separate histogram. ## ## If @var{r} is given and is a scalar, then the histogram is produced with @@ -33,14 +34,13 @@ ## The optional return value @var{h} is a vector of graphics handles to the ## line objects representing each histogram. ## -## If two output arguments are requested then, rather than plotting the -## histogram, the polar vectors necessary to plot the histogram are -## returned. +## If two output arguments are requested then no plot is made and +## the polar vectors necessary to plot the histogram are returned instead. ## ## @example ## @group -## [r, t] = rose ([2*randn(1e5,1), pi + 2*randn(1e5,1)]); -## polar (r, t); +## [r, th] = rose ([2*randn(1e5,1), pi + 2*randn(1e5,1)]); +## polar (r, th); ## @end group ## @end example ## diff --git a/scripts/plot/scatter.m b/scripts/plot/scatter.m --- a/scripts/plot/scatter.m +++ b/scripts/plot/scatter.m @@ -26,16 +26,16 @@ ## @deftypefnx {Function File} {} scatter (@var{h}, @dots{}) ## @deftypefnx {Function File} {@var{h} =} scatter (@dots{}) ## -## Plot a scatter plot of the data. A marker is plotted at each point +## Draw a scatter plot of the data. A marker is plotted at each point ## defined by the points in the vectors @var{x} and @var{y}. The size of -## the markers used is determined by the @var{s}, which can be a scalar, -## a vector of the same length of @var{x} and @var{y}. If @var{s} is not +## the markers used is determined by the @var{s}, which can be a scalar or +## a vector of the same length as @var{x} and @var{y}. If @var{s} is not ## given or is an empty matrix, then the default value of 8 points is used. ## ## The color of the markers is determined by @var{c}, which can be a string ## defining a fixed color; a 3-element vector giving the red, green,and blue ## components of the color; a vector of the same length as @var{x} that gives -## a scaled index into the current colormap; or a @var{n}-by-3 matrix defining +## a scaled index into the current colormap; or an @var{n}-by-3 matrix defining ## the colors of each of the markers individually. ## ## The marker to use can be changed with the @var{style} argument, that is a @@ -43,7 +43,10 @@ ## If the argument @code{"filled"} is given then the markers as filled. All ## additional arguments are passed to the underlying patch command. ## -## The optional return value @var{h} provides a handle to the patch object +## The optional return value @var{h} is a graphics handle to the created patch +## object. +## +## Example: ## ## @example ## @group diff --git a/scripts/plot/semilogxerr.m b/scripts/plot/semilogxerr.m --- a/scripts/plot/semilogxerr.m +++ b/scripts/plot/semilogxerr.m @@ -17,10 +17,11 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {} semilogxerr (@var{args}) +## @deftypefn {Function File} {} semilogxerr (@var{args}) +## @deftypefnx {Function File} {@var{h} =} semilogxerr (@var{args}) ## Produce two-dimensional plots using a logarithmic scale for the @var{x} ## axis and errorbars at each data point. Many different combinations of -## arguments are possible. The most used form is +## arguments are possible. The most common form is ## ## @example ## semilogxerr (@var{x}, @var{y}, @var{ey}, @var{fmt}) diff --git a/scripts/plot/semilogyerr.m b/scripts/plot/semilogyerr.m --- a/scripts/plot/semilogyerr.m +++ b/scripts/plot/semilogyerr.m @@ -17,10 +17,11 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {} semilogyerr (@var{args}) +## @deftypefn {Function File} {} semilogyerr (@var{args}) +## @deftypefnx {Function File} {@var{h} =} semilogyerr (@var{args}) ## Produce two-dimensional plots using a logarithmic scale for the @var{y} ## axis and errorbars at each data point. Many different combinations of -## arguments are possible. The most used form is +## arguments are possible. The most common form is ## ## @example ## semilogyerr (@var{x}, @var{y}, @var{ey}, @var{fmt}) diff --git a/scripts/plot/sombrero.m b/scripts/plot/sombrero.m --- a/scripts/plot/sombrero.m +++ b/scripts/plot/sombrero.m @@ -17,7 +17,8 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {} sombrero (@var{n}) +## @deftypefn {Function File} {} sombrero () +## @deftypefnx {Function File} {} sombrero (@var{n}) ## Produce the familiar three-dimensional sombrero plot using @var{n} ## grid lines. If @var{n} is omitted, a value of 41 is assumed. ## diff --git a/scripts/plot/stairs.m b/scripts/plot/stairs.m --- a/scripts/plot/stairs.m +++ b/scripts/plot/stairs.m @@ -29,9 +29,9 @@ ## If only one argument is given, it is taken as a vector of y-values ## and the x coordinates are taken to be the indices of the elements. ## -## If one output argument is requested, return a graphics handle to the plot. -## If two output arguments are specified, the data are generated but -## not plotted. For example, +## If one output argument is requested, return a graphics handle to the +## created plot. If two output arguments are specified, the data are generated +## but not plotted. For example, ## ## @example ## stairs (x, y); @@ -49,8 +49,7 @@ ## ## @noindent ## are equivalent. -## @seealso{plot, semilogx, semilogy, loglog, polar, mesh, contour, -## bar, xlabel, ylabel, title} +## @seealso{plot} ## @end deftypefn ## Author: jwe diff --git a/scripts/plot/stem.m b/scripts/plot/stem.m --- a/scripts/plot/stem.m +++ b/scripts/plot/stem.m @@ -17,7 +17,7 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {} stem (@var{x}) +## @deftypefn {Function File} {} stem (@var{y}) ## @deftypefnx {Function File} {} stem (@var{x}, @var{y}) ## @deftypefnx {Function File} {} stem (@var{x}, @var{y}, @var{linespec}) ## @deftypefnx {Function File} {} stem (@dots{}, "filled") diff --git a/scripts/plot/stem3.m b/scripts/plot/stem3.m --- a/scripts/plot/stem3.m +++ b/scripts/plot/stem3.m @@ -17,7 +17,9 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {@var{h} =} stem3 (@var{x}, @var{y}, @var{z}, @var{linespec}) +## @deftypefn {Function File} {} stem3 (@var{x}, @var{y}, @var{z}) +## @deftypefnx {Function File} {} stem3 (@var{x}, @var{y}, @var{z}, @var{linespec}) +## @deftypefnx {Function File} {@var{h} =} stem3 (@dots{}) ## Plot a three-dimensional stem graph and return the handles of the line ## and marker objects used to draw the stems as "stem series" object. ## The default color is @code{"r"} (red). The default line style is @@ -35,7 +37,7 @@ ## @noindent ## plots 31 stems with heights from 0 to 6 lying on a circle. Color ## definitions with RGB-triples are not valid! -## @seealso{bar, barh, stem, plot} +## @seealso{stem, bar, barh, plot} ## @end deftypefn function h = stem3 (varargin)