changeset 17141:2a4a83b5b317

Merge the official development
author LYH <lyh.kernel@gmail.com>
date Fri, 02 Aug 2013 01:35:41 +0800
parents 0d2253ffbe10 (current diff) e4968b4613a5 (diff)
children c3cb55d917a9
files doc/doxyhtml/Doxygen.cfg
diffstat 202 files changed, 3371 insertions(+), 2139 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am
+++ b/Makefile.am
@@ -146,6 +146,12 @@
   NEWS \
   CITATION
 
+doxyhtml:
+	$(MAKE) -C doc/doxyhtml doxyhtml
+.PHONY: doxyhtml
+
+octetc_DATA = NEWS
+
 DIRS_TO_MAKE = \
   $(localfcnfiledir) \
   $(localapifcnfiledir) \
--- a/NEWS
+++ b/NEWS
@@ -189,22 +189,22 @@
 
  ** Other new functions added in 3.8.0:
                                                   
-      atan2d                      erfcinv         jit_startcnt
-      base64_decode               erfi            lines                     
-      base64_encode               expint          polyeig                   
-      betaincinv                  findfigs        prefdir                   
-      built_in_docstrings_file    flintmax        preferences               
-      cmpermute                   fminsearch      readline_re_read_init_file
-      cmunique                    gallery         readline_read_init_file   
-      colorcube                   gco             rgbplot                   
-      copyobj                     hdl2struct      save_default_options      
-      dawson                      history_save    shrinkfaces               
-      dblist                      imformats       splinefit                 
-      debug_jit                   importdata      stemleaf                  
-      doc_cache_create            iscolormap      strjoin                   
-      ellipj                      isequaln        struct2hdl                
-      ellipke                     jit_debug       tetramesh
-                                  jit_enable      waterfall                 
+      atan2d                     erfi             jit_startcnt
+      base64_decode              expint           lines                     
+      base64_encode              findfigs         polyeig                   
+      betaincinv                 flintmax         prefdir                   
+      built_in_docstrings_file   fminsearch       preferences               
+      cmpermute                  gallery          readline_re_read_init_file
+      cmunique                   gco              readline_read_init_file   
+      colorcube                  hdl2struct       rgbplot                   
+      copyobj                    history_save     save_default_options      
+      dawson                     imformats        shrinkfaces               
+      dblist                     importdata       splinefit                 
+      debug_jit                  isaxes           stemleaf                  
+      doc_cache_create           iscolormap       strjoin   
+      ellipj                     isequaln         struct2hdl                
+      ellipke                    jit_debug        tetramesh                 
+      erfcinv                    jit_enable       waterfall 
 
  ** Deprecated functions.
 
--- a/configure.ac
+++ b/configure.ac
@@ -2619,6 +2619,14 @@
   fi
 
   if test $build_gui = yes; then
+    OCTAVE_CHECK_FUNC_QABSTRACTITEMMODEL_BEGINRESETMODEL
+    if test $octave_cv_func_qabstractitemmodel_beginresetmodel = no; then
+      AC_MSG_WARN([QAbstractItemModel::beginResetModel() not found -- disabling GUI])
+      build_gui=no
+    fi
+  fi
+
+  if test $build_gui = yes; then
     OCTAVE_CHECK_FUNC_SETPLACEHOLDERTEXT
   fi
 
@@ -2718,6 +2726,7 @@
   Makefile 
   doc/Makefile
   doc/doxyhtml/Makefile
+  doc/doxyhtml/Doxyfile
   doc/icons/Makefile
   doc/interpreter/Makefile
   doc/liboctave/Makefile
new file mode 100644
--- /dev/null
+++ b/doc/doxyhtml/Doxyfile.in
@@ -0,0 +1,320 @@
+# -*- mode: conf; -*-
+
+# Doxyfile for Doxygen 1.7.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for GNU Octave.
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the
+# config file that follow. We don't use anything but ASCII, but
+# there's no problem using UTF-8 from now on
+
+DOXYFILE_ENCODING      = UTF-8
+
+# Who we are. :-)
+
+PROJECT_NAME           = "GNU Octave"
+
+PROJECT_BRIEF          =  "A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab"
+
+# The public stable API version (unrelated to the internal API
+# version).
+
+PROJECT_NUMBER         = @PACKAGE_VERSION@
+
+# Our logo!
+
+PROJECT_LOGO           = @top_srcdir@/doc/icons/octave-logo.png
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+
+OUTPUT_DIRECTORY       = @abs_top_builddir@/doc
+
+# Create 4096 sub-directories (in 2 levels) under the output directory
+# of each output format and will distribute the generated files over
+# these directories. Enabling this option is useful for us, since
+# feeding doxygen a huge amount of source files would put all
+# generated files in the same directory would otherwise cause
+# performance problems for the file system.
+
+CREATE_SUBDIRS         = YES
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written.
+
+OUTPUT_LANGUAGE        = English
+
+# Include brief member descriptions after the members that are listed
+# in the file and class documentation (similar to JavaDoc). Set to NO
+# to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# Prepend the brief description of a member or function before the
+# detailed description. Note: if both HIDE_UNDOC_MEMBERS and
+# BRIEF_MEMBER_DESC are set to NO, the brief descriptions will be
+# completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# Show inherited members as if they were part of the current class
+
+INLINE_INHERITED_MEMB  = YES
+
+# Prepend the full path before files name in the file list and in the
+# header files.
+
+FULL_PATH_NAMES        = YES
+
+# Remove from the full path names the absolute prefix
+
+STRIP_FROM_PATH        = @top_srcdir@
+
+# Interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description (without needing the @brief
+# command).
+
+JAVADOC_AUTOBRIEF      = YES
+
+# Interpret the first line (until the first dot) of a Qt-style comment
+# as the brief descriptio (without needing the \brief command).
+
+QT_AUTOBRIEF           = NO
+
+# Undocumented member inherits the documentation from any documented
+# member that it re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+# We shouldn't have any tabs in the source code to begin with, however.
+
+TAB_SIZE               = 2
+
+# Figure out C++ stdlib classes without needing to parse those files.
+
+BUILTIN_STL_SUPPORT    = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# Assume all entities in documentation are documented, even if no
+# documentation was available.
+
+EXTRACT_ALL            = YES
+
+# Include all private members of a class.
+
+EXTRACT_PRIVATE        = YES
+
+# Include  all static members of a file.
+
+EXTRACT_STATIC         = YES
+
+# Include classes (and structs) defined locally in source files in the
+# documentation.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# We have very few namespaces, so show the ones we have
+
+SHOW_NAMESPACES        = YES
+
+# We don't use namespaces, but if we did, this would extract the
+# anonymous one.
+
+EXTRACT_ANON_NSPACES   = YES
+
+# Hide internal docs, those with the \internal command.
+
+INTERNAL_DOCS          = NO
+
+# Case-sensitive filenames
+
+CASE_SENSE_NAMES       = YES
+
+# List include files with double quotes in the documentation rather
+# than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES   = YES
+
+# Show members alphabetically
+
+SORT_MEMBER_DOCS       = YES
+
+# Also sort the brief descriptions
+
+SORT_BRIEF_DOCS        = YES
+
+# Put ctors first.
+
+SORT_MEMBERS_CTORS_1ST = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# On by default, but let's be explicit
+
+ENABLE_PREPROCESSING   = YES
+
+# Expand the DEFUN family of macros
+
+MACRO_EXPANSION = YES
+EXPAND_ONLY_PREDEF = YES
+EXPAND_AS_DEFINED = DEFUN DEFUN_DLD  # As defined in the Octave source
+                                     # code, i.e. not overriden by this
+                                     # config file
+
+# So that features that are behind #ifdef HAVE_FOO macros get processed by Doxygen
+
+PREDEFINED = HAVE_ARPACK=1          \
+             HAVE_CHOLMOD=1         \
+             HAVE_CCOLAMD=1         \
+             HAVE_CURL=1            \
+             HAVE_CXSPARSE=1        \
+             HAVE_FFTW=1            \
+             HAVE_FFTW3=1           \
+             HAVE_FFTW3F=1          \
+             HAVE_FFTW3F_THREADS=1  \
+             HAVE_FFTW3_THREADS=1   \
+             HAVE_FREETYPE=1        \
+             HAVE_GLPK=1            \
+             HAVE_HDF5=1            \
+             HAVE_LLVM=1            \
+             HAVE_MAGICK=1          \
+             HAVE_OPENMP=1          \
+             HAVE_PCRE_H=1          \
+             HAVE_PCRE_COMPILE=1    \
+             HAVE_QHULL=1           \
+             HAVE_QRUPDATE=1        \
+             HAVE_QRUPDATE_LUU=1    \
+             HAVE_QT=1              \
+             HAVE_UMFPACK=1         \
+             HAVE_X_WINDOWS=1       \
+             HAVE_ZLIB=1
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# Which directories contain Octave source code
+
+INPUT                  = @top_srcdir@/src/ @top_srcdir@/liboctave/
+INPUT                 += @top_srcdir@/libinterp @top_srcdir@/libgui
+
+# Search subdirectories for input.
+
+RECURSIVE              = YES
+
+# Our examples.
+
+EXAMPLE_PATH           = @top_srcdir@/examples/
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS       =
+
+# There are no extra C++ files in the examples subdir
+
+EXAMPLE_RECURSIVE      = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# Generate a list of source files will be generated.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Don't hide the special Doxygen comment blocks
+
+STRIP_CODE_COMMENTS    = NO
+
+# For each documented function, list all documented functions
+# referencing it.
+
+REFERENCED_BY_RELATION = YES
+
+# For each documented function all documented entities called/used by
+# that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# References link to documentation, not source code.
+
+REFERENCES_LINK_SOURCE = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# Generate HTML
+
+GENERATE_HTML          = YES
+
+# i.e. @abs_top_builddir@/doc/doxyhtml
+
+HTML_OUTPUT            = doxyhtml
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# No LaTeX
+
+GENERATE_LATEX         = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# Show undocumented relations
+
+HIDE_UNDOC_RELATIONS   = NO
+
+# Use dot from graphviz to generate class diagrams.
+
+HAVE_DOT               = YES
+
+# Remove intermediate dot files.
+
+DOT_CLEANUP            = YES
+
+# Some of our dependency graphs are really huge...
+
+DOT_GRAPH_MAX_NODES    = 100
\ No newline at end of file
deleted file mode 100644
--- a/doc/doxyhtml/Doxygen.cfg
+++ /dev/null
@@ -1,267 +0,0 @@
-# -*- mode: conf; -*-
-
-# Doxyfile for Doxygen 1.7.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for GNU Octave.
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the
-# config file that follow. We don't use anything but ASCII, but
-# there's no problem using UTF-8 from now on
-
-DOXYFILE_ENCODING      = UTF-8
-
-# Who we are. :-)
-
-PROJECT_NAME           = "GNU Octave"
-
-# The public stable API version (unrelated to the internal API
-# version).
-
-PROJECT_NUMBER         = 3.7
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-
-OUTPUT_DIRECTORY       = doc/
-
-# Create 4096 sub-directories (in 2 levels) under the output directory
-# of each output format and will distribute the generated files over
-# these directories. Enabling this option is useful for us, since
-# feeding doxygen a huge amount of source files would put all
-# generated files in the same directory would otherwise cause
-# performance problems for the file system.
-
-CREATE_SUBDIRS         = YES
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written.
-
-OUTPUT_LANGUAGE        = English
-
-# Include brief member descriptions after the members that are listed
-# in the file and class documentation (similar to JavaDoc). Set to NO
-# to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# Prepend the brief description of a member or function before the
-# detailed description. Note: if both HIDE_UNDOC_MEMBERS and
-# BRIEF_MEMBER_DESC are set to NO, the brief descriptions will be
-# completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# Show inherited members as if they were part of the current class
-
-INLINE_INHERITED_MEMB  = YES
-
-# Prepend the full path before files name in the file list and in the
-# header files.
-
-FULL_PATH_NAMES        = YES
-
-# Interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description (without needing the @brief
-# command).
-
-JAVADOC_AUTOBRIEF      = YES
-
-# Interpret the first line (until the first dot) of a Qt-style comment
-# as the brief descriptio (without needing the \brief command).
-
-QT_AUTOBRIEF           = NO
-
-# Undocumented member inherits the documentation from any documented
-# member that it re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-# We shouldn't have any tabs in the source code to begin with, however.
-
-TAB_SIZE               = 2
-
-# Figure out C++ stdlib classes without needing to parse those files.
-
-BUILTIN_STL_SUPPORT    = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# Assume all entities in documentation are documented, even if no
-# documentation was available.
-
-EXTRACT_ALL            = YES
-
-# Include all private members of a class.
-
-EXTRACT_PRIVATE        = YES
-
-# Include  all static members of a file.
-
-EXTRACT_STATIC         = YES
-
-# Include classes (and structs) defined locally in source files in the
-# documentation.
-
-EXTRACT_LOCAL_CLASSES  = YES
-
-# We don't use namespaces, but if we did, this would extract the
-# anonymous one.
-
-EXTRACT_ANON_NSPACES   = YES
-
-# Hide internal docs, those with the \internal command.
-
-INTERNAL_DOCS          = NO
-
-# Case-sensitive filenames
-
-CASE_SENSE_NAMES       = YES
-
-# List include files with double quotes in the documentation rather
-# than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES   = YES
-
-# Show members alphabetically
-
-SORT_MEMBER_DOCS       = YES
-
-# Also sort the brief descriptions
-
-SORT_BRIEF_DOCS        = YES
-
-# Put ctors first.
-
-SORT_MEMBERS_CTORS_1ST = YES
-
-# Show which directories the file is in.
-
-SHOW_DIRECTORIES       = YES
-
-# We don't have namespaces, so don't show them.
-
-SHOW_NAMESPACES        = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# Which directories contain Octave source code
-
-INPUT                  = src/ liboctave/ libinterp/
-
-# Search subdirectories for input.
-
-RECURSIVE              = YES
-
-# Our examples.
-
-EXAMPLE_PATH           = examples/
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS       =
-
-# There are no extra C++ files in the examples subdir
-
-EXAMPLE_RECURSIVE      = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# Generate a list of source files will be generated.
-
-SOURCE_BROWSER         = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# For each documented function, list all documented functions
-# referencing it.
-
-REFERENCED_BY_RELATION = YES
-
-# For each documented function all documented entities called/used by
-# that function will be listed.
-
-REFERENCES_RELATION    = YES
-
-# References link to documenation, not source code.
-
-REFERENCES_LINK_SOURCE = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# Generate HTML
-
-GENERATE_HTML          = YES
-
-# i.e. doc/doxyhtml
-
-HTML_OUTPUT            = doxyhtml
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# No LaTeX
-
-GENERATE_LATEX         = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# Show undocumented relations
-
-HIDE_UNDOC_RELATIONS   = NO
-
-# Use dot from graphviz to generate class diagrams.
-
-HAVE_DOT               = YES
-
-# Remove intermediate dot files.
-
-DOT_CLEANUP            = YES
-
--- a/doc/doxyhtml/Makefile.am
+++ b/doc/doxyhtml/Makefile.am
@@ -21,12 +21,12 @@
 include $(top_srcdir)/build-aux/common.mk
 
 doxyhtml:
-	cd ../..; doxygen doc/doxyhtml/Doxygen.cfg 
+	doxygen Doxyfile
 
 EXTRA_DIST = \
-  Doxygen.cfg \
+  Doxyfile.in \
   Makefile.am \
   README
 
 maintainer-clean-local:
-	rm -rf `ls | $(GREP) -v Doxygen.cfg | $(GREP) -v Makefile.am | $(GREP) -v Makefile.in | $(GREP) -v README`
+	rm -rf `ls | $(GREP) -v Doxyfile | $(GREP) -v Makefile.am | $(GREP) -v Makefile.in | $(GREP) -v README`
--- a/doc/interpreter/arith.txi
+++ b/doc/interpreter/arith.txi
@@ -312,7 +312,7 @@
 
 @DOCSTRING(legendre)
 
-@anchor{docXgammaln}
+@anchor{XREFgammaln}
 @DOCSTRING(lgamma)
 
 @node Rational Approximations
--- a/doc/interpreter/basics.txi
+++ b/doc/interpreter/basics.txi
@@ -154,7 +154,7 @@
 @cindex @code{-i}
 Force interactive behavior.  This can be useful for running Octave via a
 remote shell command or inside an Emacs shell buffer.  For another way
-to run Octave within Emacs, see @ref{Emacs Octave Support}.
+to run Octave within Emacs, @pxref{Emacs Octave Support}.
 
 @item --line-editing
 @cindex @code{--line-editing}
@@ -272,8 +272,8 @@
 @noindent
 Note that this does not enable the @code{Octave:matlab-incompatible}
 warning, which you might want if you want to be told about writing code
-that works in Octave but not @sc{matlab} (@pxref{docXwarning},
-@pxref{docXwarning_ids}).
+that works in Octave but not @sc{matlab} (@pxref{XREFwarning,,warning},
+@ref{XREFwarning_ids,,warning_ids}).
 
 @item  --verbose
 @itemx -V
--- a/doc/interpreter/container.txi
+++ b/doc/interpreter/container.txi
@@ -410,7 +410,7 @@
 
 @noindent
 The warning id @code{Octave:matlab-incompatible} can be enabled to warn
-about this usage.  @xref{docXwarning_ids}.
+about this usage.  @xref{XREFwarning_ids,,warning_ids}.
 
 More realistically, all of the functions that operate on strings can be used
 to build the correct field name before it is entered into the data structure.
@@ -529,7 +529,8 @@
 The simplest way to process data in a structure is within a @code{for}
 loop (@pxref{Looping Over Structure Elements}).  A similar effect can be
 achieved with the @code{structfun} function, where a user defined
-function is applied to each field of the structure.  @xref{docXstructfun}.
+function is applied to each field of the structure.
+@xref{XREFstructfun,,structfun}.
 
 Alternatively, to process the data in a structure, the structure might
 be converted to another type of container before being treated.
@@ -683,11 +684,10 @@
 @end example
 
 @noindent
-As can be seen, the @ref{docXsize, @code{size}} function also works
+As can be seen, the @ref{XREFsize,,size} function also works
 for cell arrays.  As do other functions describing the size of an
-object, such as @ref{docXlength, @code{length}}, @ref{docXnumel,
-@code{numel}}, @ref{docXrows, @code{rows}}, and @ref{docXcolumns,
-@code{columns}}.
+object, such as @ref{XREFlength,,length}, @ref{XREFnumel,, numel},
+@ref{XREFrows,,rows}, and @ref{XREFcolumns,,columns}.
 
 @DOCSTRING(cell)
 
@@ -907,7 +907,7 @@
 is to iterate through it using one or more @code{for} loops.  The same
 idea can be implemented more easily through the use of the @code{cellfun}
 function that calls a user-specified function on all elements of a cell
-array.  @xref{docXcellfun}.
+array.  @xref{XREFcellfun,,cellfun}.
 
 An alternative is to convert the data to a different container, such as
 a matrix or a data structure.  Depending on the data this is possible
--- a/doc/interpreter/debug.txi
+++ b/doc/interpreter/debug.txi
@@ -43,7 +43,7 @@
 @section Entering Debug Mode
 
 There are two basic means of interrupting the execution of an Octave
-script.  These are breakpoints @pxref{Breakpoints}, discussed in the next
+script.  These are breakpoints (@pxref{Breakpoints}), discussed in the next
 section and interruption based on some condition.
 
 Octave supports three means to stop execution based on the values set in
@@ -241,8 +241,8 @@
 @node Profiler Example
 @section Profiler Example
 
-Below, we will give a short example of a profiler session.  See also
-@ref{Profiling} for the documentation of the profiler functions in
+Below, we will give a short example of a profiler session.
+@xref{Profiling}, for the documentation of the profiler functions in
 detail.  Consider the code:
 
 @example
--- a/doc/interpreter/diagperm.txi
+++ b/doc/interpreter/diagperm.txi
@@ -436,8 +436,7 @@
 @end example
 
 @noindent
-The same can also be accomplished with broadcasting
-(@pxref{Broadcasting}):
+The same can also be accomplished with broadcasting (@pxref{Broadcasting}):
 
 @example
 @group
--- a/doc/interpreter/eval.txi
+++ b/doc/interpreter/eval.txi
@@ -79,8 +79,8 @@
 functions and should not be taken too seriously.  In addition to using a
 more robust algorithm, any serious code would check the number and type
 of all the arguments, ensure that the supplied function really was a
-function, etc.  @xref{Predicates for Numeric Objects}, for example,
-for a list of predicates for numeric objects, and see @ref{Status of
+function, etc.  @xref{Predicates for Numeric Objects},
+for a list of predicates for numeric objects, and @pxref{Status of
 Variables}, for a description of the @code{exist} function.
 
 @DOCSTRING(feval)
--- a/doc/interpreter/external.txi
+++ b/doc/interpreter/external.txi
@@ -1201,7 +1201,7 @@
 
 The documentation of an oct-file is the fourth string parameter of the
 @w{@code{DEFUN_DLD}} macro.  This string can be formatted in the same manner
-as the help strings for user functions (@ref{Documentation Tips}),
+as the help strings for user functions (@pxref{Documentation Tips}),
 however there are some issue that are particular to the formatting of
 help strings within oct-files.
 
@@ -1231,7 +1231,7 @@
 character on the line.
 
 Octave also includes the ability to embed test and demonstration
-code for a function within the code itself (@ref{Test and Demo Functions}).
+code for a function within the code itself (@pxref{Test and Demo Functions}).
 This can be used from within oct-files (or in fact any file) with
 certain provisos.  First, the test and demo functions of Octave look
 for @code{%!} as the first two characters of a line to identify test
--- a/doc/interpreter/func.txi
+++ b/doc/interpreter/func.txi
@@ -325,7 +325,7 @@
 
 It is possible to use the @code{nthargout} function to obtain only some
 of the return values or several at once in a cell array.
-@ref{Cell Array Objects}
+@xref{Cell Array Objects}.
 
 @DOCSTRING(nthargout)
 
@@ -402,7 +402,7 @@
 
 @DOCSTRING(nargoutchk)
 
-@anchor{docXvarargin} @anchor{docXvarargout}
+@anchor{XREFvarargin} @anchor{XREFvarargout}
 @node Variable-length Argument Lists
 @section Variable-length Argument Lists
 @cindex variable-length argument lists
@@ -1150,7 +1150,7 @@
 A function that has been defined on the command-line.
 
 @item Autoload function
-A function that is marked as autoloaded with @xref{docXautoload}.
+A function that is marked as autoloaded with @xref{XREFautoload,,autoload}.
 
 @item A Function on the Path
 A function that can be found on the users load-path.  There can also be
--- a/doc/interpreter/install.txi
+++ b/doc/interpreter/install.txi
@@ -517,7 +517,7 @@
 known problems below to see if there is a workaround or solution for
 your problem.  If not,
 @ifclear INSTALLONLY
-see @ref{Trouble},
+@pxref{Trouble},
 @end ifclear
 @ifset INSTALLONLY
 see the file BUGS
--- a/doc/interpreter/interp.txi
+++ b/doc/interpreter/interp.txi
@@ -29,7 +29,7 @@
 
 Octave supports several methods for one-dimensional interpolation, most
 of which are described in this section.  @ref{Polynomial Interpolation}
-and @ref{Interpolation on Scattered Data} describe further methods.
+and @ref{Interpolation on Scattered Data} describe additional methods.
 
 @DOCSTRING(interp1)
 
@@ -128,9 +128,8 @@
 @end float
 @end ifnotinfo
 
-In additional the support function @code{spline} and @code{lookup} that
+In addition, the support functions @code{spline} and @code{lookup} that
 underlie the @code{interp1} function can be called directly.
-@ref{Finding Elements and Checking Conditions}
 
 @DOCSTRING(spline)
 
--- a/doc/interpreter/intro.txi
+++ b/doc/interpreter/intro.txi
@@ -29,7 +29,7 @@
 GNU Octave is freely redistributable software.  You may redistribute 
 it and/or modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation.  The GPL is included in 
-this manual in @ref{Copying}.
+this manual, @pxref{Copying}.
 
 This manual provides comprehensive documentation on how to install, 
 run, use, and extend GNU Octave.  Additional chapters describe how 
@@ -374,7 +374,7 @@
 on the line, etc.
 
 A complete description of the command line editing capability is given
-in this manual in @ref{Command Line Editing}.
+in this manual, @pxref{Command Line Editing}.
 
 @subsection Help and Documentation
 
@@ -410,7 +410,7 @@
 text of the printed manual from within Octave normally uses a separate
 program called Info.  When you invoke Info you will be put into a menu
 driven program that contains the entire Octave manual.  Help for using
-Info is provided in this manual in @ref{Getting Help}.
+Info is provided in this manual, @pxref{Getting Help}.
 
 @node Conventions
 @section Conventions
--- a/doc/interpreter/java.txi
+++ b/doc/interpreter/java.txi
@@ -151,7 +151,7 @@
 @c ------------------------------------------------------------------------
 @node How to distinguish between Octave and Matlab?
 @subsection How to distinguish between Octave and Matlab?
-@anchor{docXFAQ}
+@anchor{XREFFAQ}
 @c - index -
 @cindex Octave and @sc{matlab}, how to distinguish between
 @c - index -
@@ -316,7 +316,7 @@
 In order to execute Java code Octave creates a Java Virtual Machine (JVM).
 Such a JVM allocates a fixed amount of initial memory and may expand this pool
 up to a fixed maximum memory limit.  The default values depend on the Java
-version (see @ref{docXjavamem,,javamem}).  The memory pool is shared by all
+version (@pxref{XREFjavamem,,javamem}).  The memory pool is shared by all
 Java objects running in the JVM@.  This strict memory limit is intended mainly
 to avoid that runaway applications inside web browsers or in enterprise servers
 can consume all memory and crash the system.  When the maximum memory limit is
--- a/doc/interpreter/matrix.txi
+++ b/doc/interpreter/matrix.txi
@@ -124,7 +124,7 @@
 
 @DOCSTRING(nth_element)
 
-@anchor{docXtriu}
+@anchor{XREFtriu}
 @DOCSTRING(tril)
 
 @DOCSTRING(vec)
--- a/doc/interpreter/munge-texi.pl
+++ b/doc/interpreter/munge-texi.pl
@@ -61,7 +61,7 @@
     }
 
     $func =~ s/^@/@@/;   # Texinfo uses @@ to produce '@'
-    $docstring =~ s/^$tex_delim$/\@anchor{docX$func}/m;
+    $docstring =~ s/^$tex_delim$/\@anchor{XREF$func}/m;
     print $docstring,"\n";
 
     next TXI_LINE;
@@ -110,7 +110,7 @@
       foreach $func (split (/,/, $func_list))
       {
         $func =~ s/^@/@@/;   # Texinfo uses @@ to produce '@'
-        $repl .= "\@ref{docX$func,,$func}, ";
+        $repl .= "\@ref{XREF$func,,$func}, ";
       }
       substr($repl,-2) = "";   # Remove last ', ' 
       $_ = "\@seealso{$repl}$rest_of_line";
--- a/doc/interpreter/numbers.txi
+++ b/doc/interpreter/numbers.txi
@@ -29,7 +29,7 @@
 (exponential) notation, or a complex number.  Note that by default numeric
 constants are represented within Octave in double-precision floating
 point format (complex constants are stored as pairs of double-precision
-floating point values).  It is however possible to represent real
+floating point values).  It is, however, possible to represent real
 integers as described in @ref{Integer Data Types}.  Here are some
 examples of real-valued numeric constants, which all have the same
 value:
@@ -359,7 +359,7 @@
 
 Empty matrices may also be used in assignment statements as a convenient
 way to delete rows or columns of matrices.
-@xref{Assignment Ops, ,Assignment Expressions}.
+@xref{Assignment Ops,,Assignment Expressions}.
 
 When Octave parses a matrix expression, it examines the elements of the
 list to determine whether they are all constants.  If they are, it
@@ -614,7 +614,7 @@
 for bit manipulation, particularly when forming masks, Octave supplies
 the function @code{bitmax}.
 
-@anchor{docXflintmax}
+@anchor{XREFflintmax}
 @DOCSTRING(bitmax)
 
 This is the double precision version of the function @code{intmax},
@@ -840,4 +840,4 @@
 
 If instead of knowing properties of variables, you wish to know which
 variables are defined and to gather other information about the
-workspace itself, see @ref{Status of Variables}.
+workspace itself, @pxref{Status of Variables}.
--- a/doc/interpreter/package.txi
+++ b/doc/interpreter/package.txi
@@ -217,7 +217,7 @@
 This is an optional file describing old entries from the @file{NEWS} file.
 
 @cindex PKG_ADD
-@anchor{docXPKG_ADD}
+@anchor{XREFPKG_ADD}
 @item package/PKG_ADD
 An optional file that includes commands that are run when the package
 is added to the users path.  Note that @w{@code{PKG_ADD}} directives in the
@@ -242,7 +242,7 @@
 directives.
 
 @cindex PKG_DEL
-@anchor{docXPKG_DEL}
+@anchor{XREFPKG_DEL}
 @item package/PKG_DEL
 An optional file that includes commands that are run when the package
 is removed from the users path.  Note that @w{@code{PKG_DEL}} directives in
--- a/doc/interpreter/plot.txi
+++ b/doc/interpreter/plot.txi
@@ -34,8 +34,8 @@
 Earlier versions of Octave provided plotting through the use of
 gnuplot.  This capability is still available.  But, a newer plotting
 capability is provided by access to OpenGL@.  Which plotting system
-is used is controlled by the @code{graphics_toolkit} function.  (See
-@ref{Graphics Toolkits}.)
+is used is controlled by the @code{graphics_toolkit} function.
+@xref{Graphics Toolkits}.
 
 The function call @code{graphics_toolkit ("fltk")} selects the
 FLTK/OpenGL system, and @code{graphics_toolkit ("gnuplot")} selects the
@@ -252,8 +252,11 @@
 The @code{xlim}, @code{ylim}, and @code{zlim} functions may be used to
 get or set individual axis limits.  Each has the same form.
 
-@anchor{docXylim}
-@anchor{docXzlim}
+@c Add cross-references and function index entries for other limit functions.
+@anchor{XREFylim}
+@anchor{XREFzlim}
+@findex ylim
+@findex zlim
 @DOCSTRING(xlim)
 
 @node Two-dimensional Function Plotting
@@ -404,7 +407,7 @@
 
 For three-dimensional plots the aspect ratio can be set for data with
 @code{daspect} and for the plot box with @code{pbaspect}.  
-See @ref{Axis Configuration} for controlling the x-, y-, and z-limits for
+@xref{Axis Configuration}, for controlling the x-, y-, and z-limits for
 plotting.
 
 @DOCSTRING(daspect)
@@ -463,8 +466,8 @@
 
 See @ref{Text Properties} for the properties that you can set.
 
-@anchor{docXylabel}
-@anchor{docXzlabel}
+@anchor{XREFylabel}
+@anchor{XREFzlabel}
 @DOCSTRING(xlabel)
 
 @DOCSTRING(clabel)
@@ -895,7 +898,7 @@
 @node Introduction to Graphics Structures
 @subsection Introduction to Graphics Structures
 @cindex introduction to graphics structures
-@anchor{docXgraphics structures}
+@anchor{XREFgraphics structures}
 
 The graphics functions use pointers, which are of class graphics_handle, in
 order to address the data structures which control graphical displays.  A
@@ -915,7 +918,7 @@
 @code{contourf}, @code{contour3}, @code{surf}, @code{mesh}, @code{surfc},
 @code{meshc}, @code{errorbar}, @code{quiver}, @code{quiver3}, @code{scatter},
 @code{scatter3}, @code{stair}, @code{stem}, @code{stem3} each return a handle
-as documented in @ref{docXdatasources,, Data Sources}.
+as documented in @ref{XREFdatasources,,Data Sources}.
 
 
 The graphics objects are arranged in a hierarchy:
@@ -932,7 +935,7 @@
 @code{surface}, and @code{image} objects.
 
 Graphics handles may be distinguished from function handles
-(@ref{Function Handles}) by means of the function @code{ishandle}.
+(@pxref{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
@@ -983,7 +986,7 @@
 color                 paperposition        windowbuttondownfcn
 colormap              paperpositionmode    windowbuttonmotionfcn
 createfcn             papersize            windowbuttonupfcn
-currentaxes           papertype            windowbuttonwheelfcn
+currentaxes           papertype            windowscrollwheelfcn
 currentcharacter      paperunits           windowstyle
 currentobject         parent               wvisual
 currentpoint          pointer              wvisualmode
@@ -998,7 +1001,7 @@
 @code{get (0, "")}.
 
 The uses of @code{get} and @code{set} are further explained in
-@ref{docXget,,get}, @ref{docXset,,set}.
+@ref{XREFget,,get}, @ref{XREFset,,set}.
 
 @DOCSTRING(isprop)
 
@@ -1006,8 +1009,8 @@
 @subsection Graphics Objects
 @cindex graphics objects
 
-The hierarchy of graphics objects was explained above.  (See 
-@ref{Introduction to Graphics Structures}.  Here the
+The hierarchy of graphics objects was explained above.
+@xref{Introduction to Graphics Structures}.  Here the
 specific objects are described, and the properties contained in
 these objects are discussed.  Keep in mind that
 graphics objects are always referenced by @dfn{handle}.
@@ -1079,13 +1082,16 @@
 @subsubsection Handle Functions
 @cindex handle functions
 
-To determine whether a variable is a graphics object index or a figure
-index, use the functions @code{ishandle} and @code{isfigure}.
+To determine whether a variable is a graphics object index, or an index
+to an axes or figure, use the functions @code{ishandle}, @code{isaxes}, and
+@code{isfigure}.
 
 @DOCSTRING(ishandle)
 
 @DOCSTRING(ishghandle)
 
+@DOCSTRING(isaxes)
+
 @DOCSTRING(isfigure)
 
 The function @code{gcf} returns an index to the current figure object,
@@ -1473,7 +1479,7 @@
 these callback functions are called, the @code{"currentpoint"} property
 holds the current coordinates of the cursor.
 
-@item windowbuttonwheelfcn
+@item windowscrollwheelfcn
 
 @item windowstyle
 
@@ -1859,7 +1865,7 @@
 @item ldata
 The lower errorbar in the y direction to be plotted.
 
-@item linestyle
+@item  linestyle
 @itemx linewidth
 @xref{Line Styles}.
 
@@ -2839,7 +2845,7 @@
 @node Data Sources in Object Groups
 @subsubsection Data Sources in Object Groups
 @cindex data sources in object groups
-@anchor{docXdatasources}
+@anchor{XREFdatasources}
 All of the group objects contain data source parameters.  There are
 string parameters that contain an expression that is evaluated to update
 the relevant data property of the group when the @code{refreshdata}
@@ -2847,7 +2853,7 @@
 
 @DOCSTRING(refreshdata)
 
-@anchor{docXlinkdata}
+@anchor{XREFlinkdata}
 @c add the description of the linkdata function here when it is written
 @c remove the explicit anchor when you add the corresponding @DOCSTRING
 @c command
--- a/doc/interpreter/sparse.txi
+++ b/doc/interpreter/sparse.txi
@@ -307,9 +307,8 @@
 
 The above problem of memory reallocation can be avoided in
 oct-files.  However, the construction of a sparse matrix from an oct-file
-is more complex than can be discussed here, and
-you are referred to chapter @ref{External Code Interface}, to have
-a full description of the techniques involved.
+is more complex than can be discussed here.  @xref{External Code Interface},
+for a a full description of the techniques involved.
 
 @node Information
 @subsection Finding out Information about Sparse Matrices
@@ -342,7 +341,7 @@
 
 When solving linear equations involving sparse matrices Octave
 determines the means to solve the equation based on the type of the
-matrix as discussed in @ref{Sparse Linear Algebra}.  Octave probes the
+matrix (@pxref{Sparse Linear Algebra}).  Octave probes the
 matrix type when the div (/) or ldiv (\) operator is first used with
 the matrix and then caches the type.  However the @dfn{matrix_type}
 function can be used to determine the type of the sparse matrix prior
--- a/doc/interpreter/stats.txi
+++ b/doc/interpreter/stats.txi
@@ -42,8 +42,8 @@
 
 It should be noted that the statistics functions don't test for data
 containing NaN, NA, or Inf.  These values need to be detected and dealt
-with explicitly.  See @ref{docXisnan,,isnan}, @ref{docXisna,,isna}, 
-@ref{docXisinf,,isinf}, @ref{docXisfinite,,isfinite}. 
+with explicitly.  See @ref{XREFisnan,,isnan}, @ref{XREFisna,,isna}, 
+@ref{XREFisinf,,isinf}, @ref{XREFisfinite,,isfinite}. 
 
 @menu
 * Descriptive Statistics::
--- a/doc/interpreter/strings.txi
+++ b/doc/interpreter/strings.txi
@@ -249,9 +249,9 @@
 
 Nevertheless, there are several other functions for concatenating string
 objects which can be useful in specific circumstances: @code{char},
-@code{strvcat}, @code{strcat} and @code{cstrcat}.  Finally, the general
-purpose concatenation functions can be used: see @ref{docXcat,,cat},
-@ref{docXhorzcat,,horzcat} and @ref{docXvertcat,,vertcat}.
+@code{strvcat}, @code{strcat}, and @code{cstrcat}.  Finally, the general
+purpose concatenation functions can be used: see @ref{XREFcat,,cat},
+@ref{XREFhorzcat,,horzcat}, and @ref{XREFvertcat,,vertcat}.
 
 @itemize @bullet
 @item All string concatenation functions except @code{cstrcat}
@@ -368,7 +368,7 @@
 integer matrices.  @code{int2str} takes the real part of complex values and
 round fractional values to integer.  A more flexible way to format numerical
 data as strings is the @code{sprintf} function (@pxref{Formatted Output},
-@ref{docXsprintf}).
+@ref{XREFsprintf,,sprintf}).
 
 @DOCSTRING(mat2str)
 
--- a/doc/interpreter/system.txi
+++ b/doc/interpreter/system.txi
@@ -121,7 +121,7 @@
 
 @DOCSTRING(is_leap_year)
 
-@anchor{docXtoc}
+@anchor{XREFtoc}
 @DOCSTRING(tic)
 
 @DOCSTRING(pause)
@@ -177,7 +177,7 @@
 
 @DOCSTRING(umask)
 
-@anchor{docXlstat}
+@anchor{XREFlstat}
 @DOCSTRING(stat)
 
 @DOCSTRING(S_ISBLK)
--- a/doc/interpreter/var.txi
+++ b/doc/interpreter/var.txi
@@ -49,7 +49,7 @@
 A variable name is a valid expression by itself.  It represents the
 variable's current value.  Variables are given new values with
 @dfn{assignment operators} and @dfn{increment operators}.
-@xref{Assignment Ops, ,Assignment Expressions}.
+@xref{Assignment Ops,,Assignment Expressions}.
 
 There is one built-in variable with a special meaning.  The @code{ans} variable
 always contains the result of the last computation, where the output wasn't
@@ -178,7 +178,7 @@
 @cindex persistent variables
 @cindex @code{persistent} statement
 @cindex variables, persistent
-@anchor{docXpersistent}
+@anchor{XREFpersistent}
 
 A variable that has been declared @dfn{persistent} within a function
 will retain its contents in memory between subsequent calls to the
@@ -299,8 +299,8 @@
 variable will be cleared by a simple @code{clear} command as the entire
 function definition will be removed from memory.  If you do not want
 a persistent variable to be removed from memory even if the function is
-cleared, you should use the @code{mlock} function as described in
-@xref{Function Locking}.
+cleared, you should use the @code{mlock} function
+(@pxref{Function Locking}).
 
 @node Status of Variables
 @section Status of Variables
--- a/doc/interpreter/vectorize.txi
+++ b/doc/interpreter/vectorize.txi
@@ -457,7 +457,7 @@
 that may have relied on matrices of different size producing an error.
 Due to how broadcasting changes semantics with older versions of Octave,
 by default Octave warns if a broadcasting operation is performed.  To
-disable this warning, refer to its ID (@pxref{docXwarning_ids}):
+disable this warning, refer to its ID (@pxref{XREFwarning_ids,,warning_ids}):
 
 @example
 warning ("off", "Octave:broadcast");
--- a/libgui/src/main-window.cc
+++ b/libgui/src/main-window.cc
@@ -77,7 +77,8 @@
     workspace_window (new workspace_view (this)),
     find_files_dlg (0),
     _octave_main_thread (0),
-    _octave_qt_link (0)
+    _octave_qt_link (0),
+    _clipboard (QApplication::clipboard ())
 {
   // We have to set up all our windows, before we finally launch octave.
   construct ();
@@ -852,8 +853,6 @@
 
   construct_octave_qt_link ();
 
-  set_global_shortcuts (true);
-
 #ifdef HAVE_QSCINTILLA
   connect (this,
            SIGNAL (insert_debugger_pointer_signal (const QString&, int)),
@@ -875,6 +874,9 @@
   set_current_working_directory (curr_dir.absolutePath ());
 
   octave_link::post_event (this, &main_window::resize_command_window_callback);
+
+  set_global_shortcuts (true);
+
 }
 
 void
@@ -1083,15 +1085,19 @@
                             tr ("Copy"), this, SLOT (copyClipboard ()));
   _copy_action->setShortcut (QKeySequence::Copy);
 
+
   _paste_action
     = edit_menu->addAction (QIcon (":/actions/icons/editpaste.png"),
                             tr ("Paste"), this, SLOT (pasteClipboard ()));
   _paste_action->setShortcut (QKeySequence::Paste);
 
+  _clear_clipboard_action
+    = edit_menu->addAction (tr ("Clear Clipboard"), this,
+                            SLOT (clear_clipboard ()));
+
   edit_menu->addSeparator ();
 
-  _find_files_action
-    = edit_menu->addAction (tr ("Find Files..."));
+  _find_files_action = edit_menu->addAction (tr ("Find Files..."));
 
   edit_menu->addSeparator ();
 
@@ -1115,6 +1121,10 @@
 
   connect (clear_workspace_action, SIGNAL (triggered ()),
            this, SLOT (handle_clear_workspace_request ()));
+
+  connect (_clipboard, SIGNAL (changed (QClipboard::Mode)),
+           this, SLOT (clipboard_has_changed (QClipboard::Mode)));
+  clipboard_has_changed (QClipboard::Clipboard);
 }
 
 QAction *
@@ -1638,4 +1648,26 @@
   emit show_doc_signal (file);
 }
 
+void
+main_window::clipboard_has_changed (QClipboard::Mode cp_mode)
+{
+  if (cp_mode == QClipboard::Clipboard)
+    {
+      if (_clipboard->text ().isEmpty ())
+        {
+          _paste_action->setEnabled (false);
+          _clear_clipboard_action->setEnabled (false);
+        }
+      else
+        {
+          _paste_action->setEnabled (true);
+          _clear_clipboard_action->setEnabled (true);
+        }
+    }
+}
 
+void
+main_window::clear_clipboard ()
+{
+  _clipboard->clear (QClipboard::Clipboard);
+}
--- a/libgui/src/main-window.h
+++ b/libgui/src/main-window.h
@@ -182,6 +182,11 @@
   // setting global shortcuts
   void set_global_shortcuts (bool enable);
 
+  // handling the clipboard
+  void clipboard_has_changed (QClipboard::Mode);
+  void clear_clipboard ();
+
+
 protected:
   void closeEvent (QCloseEvent * closeEvent);
 
@@ -286,6 +291,7 @@
 
   QAction *_copy_action;
   QAction *_paste_action;
+  QAction *_clear_clipboard_action;
   QAction *_undo_action;
 
   QAction *_find_files_action;
@@ -305,6 +311,8 @@
 
   octave_qt_link *_octave_qt_link;
 
+  QClipboard *_clipboard;
+
   // Flag for closing whole application.
   bool _closing;
 };
--- a/libgui/src/qtinfo/parser.cc
+++ b/libgui/src/qtinfo/parser.cc
@@ -628,10 +628,10 @@
       QString k = it.key ();
       node_position p = it.value ();
 
-      if (k == "docX" + ref_name)
+      if (k == "XREF" + ref_name)
         {
           // found ref, so return its name
-          text = "docX" + ref_name;
+          text = "XREF" + ref_name;
         }
     }
   return text;
--- a/libinterp/corefcn/data.cc
+++ b/libinterp/corefcn/data.cc
@@ -5213,29 +5213,53 @@
               // we've handled the last parameter, so act as if it was removed
               nargin --;
             }
-          else if (nargin > 1 && ! args(1).is_scalar_type ())
-            gripe_wrong_type_arg ("norm", args(1), true);
 
           if (! error_state)
             {
               octave_value p_arg = (nargin > 1) ? args(1) : octave_value (2);
-              switch (strflag)
+
+              if (p_arg.is_empty ())
+                p_arg = octave_value (2);
+              else if (p_arg.is_string ())
                 {
-                case sfmatrix:
-                  retval(0) = xnorm (x_arg, p_arg);
-                  break;
-                case sfcols:
-                  retval(0) = xcolnorms (x_arg, p_arg);
-                  break;
-                case sfrows:
-                  retval(0) = xrownorms (x_arg, p_arg);
-                  break;
-                case sffrob:
-                  retval(0) = xfrobnorm (x_arg);
-                  break;
-                case sfinf:
-                  retval(0) = xnorm (x_arg, octave_Inf);
-                  break;
+                  std::string str = p_arg.string_value ();
+                  if ((strflag == sfcols || strflag == sfrows))
+                    {
+                      if (str == "cols" || str == "columns" || str == "rows")
+                        error ("norm: invalid combination of options");
+                      else if (str == "fro")
+                        p_arg = octave_value (2);
+                      else if (str == "inf")
+                        p_arg = octave_Inf;
+                      else
+                        error ("norm: unrecognized option: %s", str.c_str ());
+                    }
+                  else
+                    error ("norm: invalid combination of options");
+                }
+              else if (! p_arg.is_scalar_type ())
+                gripe_wrong_type_arg ("norm", p_arg, true);
+
+              if (! error_state)
+                {
+                  switch (strflag)
+                    {
+                    case sfmatrix:
+                      retval(0) = xnorm (x_arg, p_arg);
+                      break;
+                    case sfcols:
+                      retval(0) = xcolnorms (x_arg, p_arg);
+                      break;
+                    case sfrows:
+                      retval(0) = xrownorms (x_arg, p_arg);
+                      break;
+                    case sffrob:
+                      retval(0) = xfrobnorm (x_arg);
+                      break;
+                    case sfinf:
+                      retval(0) = xnorm (x_arg, octave_Inf);
+                      break;
+                    }
                 }
             }
         }
@@ -5299,6 +5323,18 @@
 %!assert (norm (flo*m2,"fro"), single (sqrt (30)*flo), -eps ("single"))
 %!assert (norm (fhi*m2,"fro"), single (sqrt (30)*fhi), -eps ("single"))
 
+%!shared q
+%! q = rand (1e3, 3);
+%!assert (norm (q, 3, "rows"), sum (q.^3, 2).^(1/3), sqrt (eps));
+%!assert (norm (q, "fro", "rows"), sum (q.^2, 2).^(1/2), sqrt (eps));
+%!assert (norm (q, "fro", "rows"), sqrt (sumsq (q, 2)), sqrt (eps));
+%!assert (norm (q, "fro", "cols"), sqrt (sumsq (q, 1)), sqrt (eps));
+%!assert (norm (q, 3, "cols"), sum (q.^3, 1).^(1/3), sqrt (eps));
+%!assert (norm (q, "inf", "rows"), norm (q, Inf, "rows"));
+%!assert (norm (q, "inf", "cols"), norm (q, Inf, "cols"));
+%!assert (norm (q, [], "rows"), norm (q, 2, "rows"));
+%!assert (norm (q, [], "cols"), norm (q, 2, "cols"));
+
 %!test
 %! ## Test for norm returning NaN on sparse matrix (bug #30631)
 %! A = sparse (2,2); 
--- a/libinterp/corefcn/error.cc
+++ b/libinterp/corefcn/error.cc
@@ -1236,7 +1236,7 @@
 The optional message identifier allows users to enable or disable\n\
 warnings tagged by @var{id}.  A message identifier is of the form\n\
 \"NAMESPACE:WARNING-NAME\".  Octave's own warnings use the \"Octave\"\n\
-namespace (@pxref{docXwarning_ids}).  The special identifier @samp{\"all\"}\n\
+namespace (@pxref{XREFwarning_ids}).  The special identifier @samp{\"all\"}\n\
 may be used to set the state of all warnings.\n\
 \n\
 If the first argument is @samp{\"on\"} or @samp{\"off\"}, set the state\n\
--- a/libinterp/corefcn/graphics.cc
+++ b/libinterp/corefcn/graphics.cc
@@ -6915,6 +6915,8 @@
   xinitialize (xproperties.get_xlabel ());
   xinitialize (xproperties.get_ylabel ());
   xinitialize (xproperties.get_zlabel ());
+
+  xproperties.sync_positions ();
 }
 
 // ---------------------------------------------------------------------
@@ -8285,10 +8287,11 @@
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} ishandle (@var{h})\n\
 Return true if @var{h} is a graphics handle and false otherwise.\n\
+\n\
 @var{h} may also be a matrix of handles in which case a logical\n\
 array is returned that is true where the elements of @var{h} are\n\
 graphics handles and false where they are not.\n\
-@seealso{isfigure}\n\
+@seealso{isaxes, isfigure}\n\
 @end deftypefn")
 {
   gh_manager::auto_lock guard;
--- a/libinterp/corefcn/graphics.in.h
+++ b/libinterp/corefcn/graphics.in.h
@@ -46,7 +46,7 @@
 #include "ov.h"
 #include "txt-eng-ft.h"
 
-// FIXME -- maybe this should be a configure option?
+// FIXME: maybe this should be a configure option?
 // Matlab defaults to "Helvetica", but that causes problems for many
 // gnuplot users.
 #if !defined (OCTAVE_DEFAULT_FONTNAME)
@@ -1483,7 +1483,7 @@
 
       if (validate (tmp))
         {
-          // FIXME -- should we check for actual data change?
+          // FIXME: should we check for actual data change?
           if (! is_equal (tmp))
             {
               data = tmp;
@@ -2361,7 +2361,7 @@
 
 private:
 
-  // FIXME -- default toolkit should be configurable.
+  // FIXME: default toolkit should be configurable.
 
   gtk_manager (void)
     : dtk ("gnuplot"), available_toolkits (), loaded_toolkits () { }
@@ -2628,22 +2628,22 @@
 
   static property_list::pval_map_type factory_defaults (void);
 
-  // FIXME -- these functions should be generated automatically by the
-  // genprops.awk script.
+  // FIXME: these functions should be generated automatically by the
+  //        genprops.awk script.
   //
   // EMIT_BASE_PROPERTIES_GET_FUNCTIONS
 
+  virtual octave_value get_alim (void) const { return octave_value (); }
+  virtual octave_value get_clim (void) const { return octave_value (); }
   virtual octave_value get_xlim (void) const { return octave_value (); }
   virtual octave_value get_ylim (void) const { return octave_value (); }
   virtual octave_value get_zlim (void) const { return octave_value (); }
-  virtual octave_value get_clim (void) const { return octave_value (); }
-  virtual octave_value get_alim (void) const { return octave_value (); }
-
+
+  virtual bool is_aliminclude (void) const { return false; }
+  virtual bool is_climinclude (void) const { return false; }
   virtual bool is_xliminclude (void) const { return false; }
   virtual bool is_yliminclude (void) const { return false; }
   virtual bool is_zliminclude (void) const { return false; }
-  virtual bool is_climinclude (void) const { return false; }
-  virtual bool is_aliminclude (void) const { return false; }
 
   bool is_handle_visible (void) const;
 
@@ -2679,13 +2679,12 @@
     bool_property selectionhighlight , "on"
     string_property tag s , ""
     string_property type frs , ty
+    handle_property uicontextmenu , graphics_handle ()
     any_property userdata , Matrix ()
     bool_property visible , "on"
-    // additional (octave-specific) properties
+    // additional (Octave-specific) properties
     bool_property __modified__ s , "on"
     graphics_handle __myhandle__ fhrs , mh
-    // FIXME -- should this really be here?
-    handle_property uicontextmenu , graphics_handle ()
   END_PROPERTIES
 
 protected:
@@ -3110,11 +3109,17 @@
 
   operator bool (void) const { return rep->valid_object (); }
 
-  // FIXME -- these functions should be generated automatically by the
-  // genprops.awk script.
+  // FIXME: these functions should be generated automatically by the
+  //        genprops.awk script.
   //
   // EMIT_GRAPHICS_OBJECT_GET_FUNCTIONS
 
+  octave_value get_alim (void) const
+  { return get_properties ().get_alim (); }
+
+  octave_value get_clim (void) const
+  { return get_properties ().get_clim (); }
+
   octave_value get_xlim (void) const
   { return get_properties ().get_xlim (); }
 
@@ -3124,11 +3129,11 @@
   octave_value get_zlim (void) const
   { return get_properties ().get_zlim (); }
 
-  octave_value get_clim (void) const
-  { return get_properties ().get_clim (); }
-
-  octave_value get_alim (void) const
-  { return get_properties ().get_alim (); }
+  bool is_aliminclude (void) const
+  { return get_properties ().is_aliminclude (); }
+
+  bool is_climinclude (void) const
+  { return get_properties ().is_climinclude (); }
 
   bool is_xliminclude (void) const
   { return get_properties ().is_xliminclude (); }
@@ -3139,12 +3144,6 @@
   bool is_zliminclude (void) const
   { return get_properties ().is_zliminclude (); }
 
-  bool is_climinclude (void) const
-  { return get_properties ().is_climinclude (); }
-
-  bool is_aliminclude (void) const
-  { return get_properties ().is_aliminclude (); }
-
   bool is_handle_visible (void) const
   { return get_properties ().is_handle_visible (); }
 
@@ -3187,14 +3186,22 @@
     // See the genprops.awk script for an explanation of the
     // properties declarations.
 
-    // FIXME -- it seems strange to me that the diary, diaryfile,
-    // echo, format, formatspacing, language, and recursionlimit
-    // properties are here.  WTF do they have to do with graphics?
+    // FIXME: it seems strange to me that the diary, diaryfile,
+    // echo, errormessage, format, formatspacing, language, and
+    // recursionlimit properties are here.
+    // WTF do they have to do with graphics?
     // Also note that these properties (and the monitorpositions,
     // pointerlocation, and pointerwindow properties) are not yet used
     // by Octave, so setting them will have no effect, and changes
     // made elswhere (say, the diary or format functions) will not
     // cause these properties to be updated.
+    // ANSWER: Matlab defines these properties and uses them in
+    // the same way that Octave uses an internal static variable to
+    // keep track of state.  set (0, "echo", "on") is equivalent
+    // to Octave's echo ("on").  Maybe someday we can connect callbacks
+    // that actually call Octave's own functions for this.
+
+    // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (root_figure, root)
       handle_property callbackobject Sr , graphics_handle ()
@@ -3203,12 +3210,14 @@
       bool_property diary , "off"
       string_property diaryfile , "diary"
       bool_property echo , "off"
-      radio_property format , "+|bank|bit|debug|hex|long|longe|longeng|longg|native-bit|native-hex|rational|{short}|shorte|shorteng|shortg"
-      radio_property formatspacing , "{loose}|compact"
+      string_property errormessage , ""
+      string_property fixedwidthfontname , "Courier"
+      radio_property format , "+|bank|bit|hex|long|longe|longeng|longg|native-bit|native-hex|none|rational|{short}|shorte|shorteng|shortg"
+      radio_property formatspacing , "compact|{loose}"
       string_property language , "ascii"
       array_property monitorpositions , Matrix (1, 4, 0)
       array_property pointerlocation , Matrix (1, 2, 0)
-      double_property pointerwindow , 0.0
+      double_property pointerwindow r , 0.0
       double_property recursionlimit , 256.0
       double_property screendepth r , default_screendepth ()
       double_property screenpixelsperinch r , default_screenpixelsperinch ()
@@ -3393,17 +3402,15 @@
 
     // See the genprops.awk script for an explanation of the
     // properties declarations.
+    // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (figure)
-      any_property __plot_stream__ h , Matrix ()
-      bool_property __enhanced__ h , "on"
-      radio_property nextplot , "new|{add}|replacechildren|replace"
+      array_property alphamap , Matrix (64, 1, 1)
+      callback_property buttondownfcn , Matrix ()
       callback_property closerequestfcn , "closereq"
+      color_property color , color_property (color_values (1, 1, 1), radio_values ("none"))
+      array_property colormap , jet_colormap ()
       handle_property currentaxes S , graphics_handle ()
-      array_property colormap , jet_colormap ()
-      radio_property paperorientation U , "{portrait}|landscape|rotated"
-      color_property color , color_property (color_values (1, 1, 1), radio_values ("none"))
-      array_property alphamap , Matrix (64, 1, 1)
       string_property currentcharacter r , ""
       handle_property currentobject r , graphics_handle ()
       array_property currentpoint r , Matrix (2, 1, 0)
@@ -3417,13 +3424,15 @@
       radio_property menubar , "none|{figure}"
       double_property mincolormap , 64
       string_property name , ""
+      radio_property nextplot , "new|{add}|replacechildren|replace"
       bool_property numbertitle , "on"
       array_property outerposition s , Matrix (1, 4, -1.0)
-      radio_property paperunits Su , "{inches}|centimeters|normalized|points"
+      radio_property paperorientation U , "{portrait}|landscape|rotated"
       array_property paperposition , default_figure_paperposition ()
       radio_property paperpositionmode , "auto|{manual}"
       array_property papersize U , default_figure_papersize ()
       radio_property papertype SU , "{usletter}|uslegal|a0|a1|a2|a3|a4|a5|b0|b1|b2|b3|b4|b5|arch-a|arch-b|arch-c|arch-d|arch-e|a|b|c|d|e|tabloid|<custom>"
+      radio_property paperunits Su , "{inches}|centimeters|normalized|points"
       radio_property pointer , "crosshair|fullcrosshair|{arrow}|ibeam|watch|topl|topr|botl|botr|left|top|right|bottom|circle|cross|fleur|custom|hand"
       array_property pointershapecdata , Matrix (16, 16, 0)
       array_property pointershapehotspot , Matrix (1, 2, 0)
@@ -3438,16 +3447,20 @@
       callback_property windowbuttondownfcn , Matrix ()
       callback_property windowbuttonmotionfcn , Matrix ()
       callback_property windowbuttonupfcn , Matrix ()
-      callback_property windowbuttonwheelfcn , Matrix ()
+      callback_property windowkeypressfcn , Matrix ()
+      callback_property windowkeyreleasefcn , Matrix ()
+      callback_property windowscrollwheelfcn , Matrix ()
       radio_property windowstyle , "{normal}|modal|docked"
       string_property wvisual , ""
       radio_property wvisualmode , "{auto}|manual"
       string_property xdisplay , ""
       string_property xvisual , ""
       radio_property xvisualmode , "{auto}|manual"
-      callback_property buttondownfcn , Matrix ()
+      // Octave-specific properties
+      bool_property __enhanced__ h , "on"
       string_property __graphics_toolkit__ s , "gnuplot"
       any_property __guidata__ h , Matrix ()
+      any_property __plot_stream__ h , Matrix ()
     END_PROPERTIES
 
   protected:
@@ -3662,6 +3675,8 @@
         update_axes_layout ();
       }
 
+    void sync_positions (void);
+
     void update_autopos (const std::string& elem_type);
     void update_xlabel_position (void);
     void update_ylabel_position (void);
@@ -3762,80 +3777,29 @@
 
     // See the genprops.awk script for an explanation of the
     // properties declarations.
-
-    // properties which are not in matlab: interpreter
+    // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (axes)
-      array_property position u , default_axes_position ()
+      radio_property activepositionproperty , "{outerposition}|position"
+      row_vector_property alim m , default_lim ()
+      radio_property alimmode , "{auto}|manual"
+      color_property ambientlightcolor , color_values (1, 1, 1)
       bool_property box , "on"
+      array_property cameraposition m , Matrix (1, 3, 0.0)
+      radio_property camerapositionmode , "{auto}|manual"
+      array_property cameratarget m , Matrix (1, 3, 0.0)
+      radio_property cameratargetmode , "{auto}|manual"
+      array_property cameraupvector m , Matrix ()
+      radio_property cameraupvectormode , "{auto}|manual"
+      double_property cameraviewangle m , 10.0
+      radio_property cameraviewanglemode , "{auto}|manual"
+      row_vector_property clim m , default_lim ()
+      radio_property climmode al , "{auto}|manual"
+      color_property color , color_property (color_values (1, 1, 1), radio_values ("none"))
       array_property colororder , default_colororder ()
+      array_property currentpoint , Matrix (2, 3, 0.0)
       array_property dataaspectratio mu , Matrix (1, 3, 1.0)
       radio_property dataaspectratiomode u , "{auto}|manual"
-      radio_property layer u , "{bottom}|top"
-      row_vector_property xlim mu , default_lim ()
-      row_vector_property ylim mu , default_lim ()
-      row_vector_property zlim mu , default_lim ()
-      row_vector_property clim m , default_lim ()
-      row_vector_property alim m , default_lim ()
-      radio_property xlimmode al , "{auto}|manual"
-      radio_property ylimmode al , "{auto}|manual"
-      radio_property zlimmode al , "{auto}|manual"
-      radio_property climmode al , "{auto}|manual"
-      radio_property alimmode    , "{auto}|manual"
-      handle_property xlabel SOf , gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)
-      handle_property ylabel SOf , gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)
-      handle_property zlabel SOf , gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)
-      handle_property title SOf , gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)
-      bool_property xgrid , "off"
-      bool_property ygrid , "off"
-      bool_property zgrid , "off"
-      bool_property xminorgrid , "off"
-      bool_property yminorgrid , "off"
-      bool_property zminorgrid , "off"
-      row_vector_property xtick mu , default_axes_tick ()
-      row_vector_property ytick mu , default_axes_tick ()
-      row_vector_property ztick mu , default_axes_tick ()
-      radio_property xtickmode u , "{auto}|manual"
-      radio_property ytickmode u , "{auto}|manual"
-      radio_property ztickmode u , "{auto}|manual"
-      bool_property xminortick , "off"
-      bool_property yminortick , "off"
-      bool_property zminortick , "off"
-      // FIXME -- should be kind of string array.
-      any_property xticklabel S , ""
-      any_property yticklabel S , ""
-      any_property zticklabel S , ""
-      radio_property xticklabelmode u , "{auto}|manual"
-      radio_property yticklabelmode u , "{auto}|manual"
-      radio_property zticklabelmode u , "{auto}|manual"
-      radio_property interpreter , "tex|{none}|latex"
-      color_property color , color_property (color_values (1, 1, 1), radio_values ("none"))
-      color_property xcolor , color_values (0, 0, 0)
-      color_property ycolor , color_values (0, 0, 0)
-      color_property zcolor , color_values (0, 0, 0)
-      radio_property xscale alu , "{linear}|log"
-      radio_property yscale alu , "{linear}|log"
-      radio_property zscale alu , "{linear}|log"
-      radio_property xdir u , "{normal}|reverse"
-      radio_property ydir u , "{normal}|reverse"
-      radio_property zdir u , "{normal}|reverse"
-      radio_property yaxislocation u , "{left}|right|zero"
-      radio_property xaxislocation u , "{bottom}|top|zero"
-      array_property view u , Matrix ()
-      bool_property __hold_all__ h , "off"
-      radio_property nextplot , "new|add|replacechildren|{replace}"
-      array_property outerposition u , default_axes_outerposition ()
-      radio_property activepositionproperty , "{outerposition}|position"
-      color_property ambientlightcolor , color_values (1, 1, 1)
-      array_property cameraposition m , Matrix (1, 3, 0.0)
-      array_property cameratarget m , Matrix (1, 3, 0.0)
-      array_property cameraupvector m , Matrix ()
-      double_property cameraviewangle m , 10.0
-      radio_property camerapositionmode , "{auto}|manual"
-      radio_property cameratargetmode , "{auto}|manual"
-      radio_property cameraupvectormode , "{auto}|manual"
-      radio_property cameraviewanglemode , "{auto}|manual"
-      array_property currentpoint , Matrix (2, 3, 0.0)
       radio_property drawmode , "{normal}|fast"
       radio_property fontangle u , "{normal}|italic|oblique"
       string_property fontname u , OCTAVE_DEFAULT_FONTNAME
@@ -3843,18 +3807,75 @@
       radio_property fontunits SU , "{points}|normalized|inches|centimeters|pixels"
       radio_property fontweight u , "{normal}|light|demi|bold"
       radio_property gridlinestyle , "-|--|{:}|-.|none"
+      // NOTE: interpreter is not a Matlab axis property, but it makes
+      //       more sense to have it so that axis ticklabels can use it.
+      radio_property interpreter , "tex|{none}|latex"
+      radio_property layer u , "{bottom}|top"
       string_array_property linestyleorder , "-"
       double_property linewidth , 0.5
       radio_property minorgridlinestyle , "-|--|{:}|-.|none"
+      radio_property nextplot , "add|replacechildren|{replace}"
+      array_property outerposition u , default_axes_outerposition ()
       array_property plotboxaspectratio mu , Matrix (1, 3, 1.0)
       radio_property plotboxaspectratiomode u , "{auto}|manual"
+      array_property position u , default_axes_position ()
       radio_property projection , "{orthographic}|perpective"
       radio_property tickdir mu , "{in}|out"
       radio_property tickdirmode u , "{auto}|manual"
       array_property ticklength u , default_axes_ticklength ()
       array_property tightinset r , Matrix (1, 4, 0.0)
-      // FIXME -- uicontextmenu should be moved here.
+      handle_property title SOf , gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)
+      // FIXME: uicontextmenu should be moved here.
       radio_property units SU , "{normalized}|inches|centimeters|points|pixels|characters"
+      array_property view u , Matrix ()
+      radio_property xaxislocation u , "{bottom}|top|zero"
+      color_property xcolor , color_values (0, 0, 0)
+      radio_property xdir u , "{normal}|reverse"
+      bool_property xgrid , "off"
+      handle_property xlabel SOf , gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)
+      row_vector_property xlim mu , default_lim ()
+      radio_property xlimmode al , "{auto}|manual"
+      bool_property xminorgrid , "off"
+      bool_property xminortick , "off"
+      radio_property xscale alu , "{linear}|log"
+      row_vector_property xtick mu , default_axes_tick ()
+      // FIXME: should be kind of string array.
+      any_property xticklabel S , ""
+      radio_property xticklabelmode u , "{auto}|manual"
+      radio_property xtickmode u , "{auto}|manual"
+      radio_property yaxislocation u , "{left}|right|zero"
+      color_property ycolor , color_values (0, 0, 0)
+      radio_property ydir u , "{normal}|reverse"
+      bool_property ygrid , "off"
+      handle_property ylabel SOf , gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)
+      row_vector_property ylim mu , default_lim ()
+      radio_property ylimmode al , "{auto}|manual"
+      bool_property yminorgrid , "off"
+      bool_property yminortick , "off"
+      radio_property yscale alu , "{linear}|log"
+      row_vector_property ytick mu , default_axes_tick ()
+      any_property yticklabel S , ""
+      radio_property yticklabelmode u , "{auto}|manual"
+      radio_property ytickmode u , "{auto}|manual"
+      color_property zcolor , color_values (0, 0, 0)
+      radio_property zdir u , "{normal}|reverse"
+      bool_property zgrid , "off"
+      handle_property zlabel SOf , gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)
+      row_vector_property zlim mu , default_lim ()
+      radio_property zlimmode al , "{auto}|manual"
+      bool_property zminorgrid , "off"
+      bool_property zminortick , "off"
+      radio_property zscale alu , "{linear}|log"
+      row_vector_property ztick mu , default_axes_tick ()
+      any_property zticklabel S , ""
+      radio_property zticklabelmode u , "{auto}|manual"
+      radio_property ztickmode u , "{auto}|manual"
+      // Octave-specific properties
+      bool_property __hold_all__ h , "off"
+      // hidden properties for alignment of subplots
+      radio_property autopos_tag h , "{none}|subplot"
+      // hidden properties for inset
+      array_property looseinset hu , Matrix (1, 4, 0.0)
       // hidden properties for transformation computation
       array_property x_viewtransform h , Matrix (4, 4, 0.0)
       array_property x_projectiontransform h , Matrix (4, 4, 0.0)
@@ -3865,10 +3886,6 @@
       row_vector_property xmtick h , Matrix ()
       row_vector_property ymtick h , Matrix ()
       row_vector_property zmtick h , Matrix ()
-      // hidden properties for inset
-      array_property looseinset hu , Matrix (1, 4, 0.0)
-      // hidden properties for alignment of subplots
-      radio_property autopos_tag h , "{none}|subplot"
    END_PROPERTIES
 
   protected:
@@ -3991,8 +4008,6 @@
     void update_fontangle (void) { update_font (); }
     void update_fontweight (void) { update_font (); }
 
-    void sync_positions (void);
-
     void update_outerposition (void)
     {
       set_activepositionproperty ("outerposition");
@@ -4208,7 +4223,7 @@
   {
     octave_value retval;
 
-    // FIXME -- finish this.
+    // FIXME: finish this.
     if (name.compare ("default", 7))
       retval = get_default (name.substr (7));
     else
@@ -4254,26 +4269,28 @@
   public:
     // See the genprops.awk script for an explanation of the
     // properties declarations.
-
-    // properties which are not in matlab: interpreter
+    // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (line)
-      row_vector_property xdata u , default_data ()
-      row_vector_property ydata u , default_data ()
-      row_vector_property zdata u , Matrix ()
-      string_property xdatasource , ""
-      string_property ydatasource , ""
-      string_property zdatasource , ""
       color_property color , color_values (0, 0, 0)
+      string_property displayname , ""
+      radio_property erasemode , "{normal}|none|xor|background"
+      // FIXME: interpreter is not a property of Matlab line objects.
+      //        Octave uses this for legend() with the string displayname.
+      radio_property interpreter , "{tex}|none|latex"
       radio_property linestyle , "{-}|--|:|-.|none"
       double_property linewidth , 0.5
-      radio_property marker , "{none}|s|o|x|+|.|*|<|>|v|^|d|p|h|@"
+      radio_property marker , "{none}|+|o|*|.|x|s|d|^|v|>|<|p|h"
       color_property markeredgecolor , "{auto}|none"
       color_property markerfacecolor , "auto|{none}"
       double_property markersize , 6
-      radio_property interpreter , "{tex}|none|latex"
-      string_property displayname , ""
-      radio_property erasemode , "{normal}|none|xor|background"
+      row_vector_property xdata u , default_data ()
+      string_property xdatasource , ""
+      row_vector_property ydata u , default_data ()
+      string_property ydatasource , ""
+      row_vector_property zdata u , Matrix ()
+      string_property zdatasource , ""
+
       // hidden properties for limit computation
       row_vector_property xlim hlr , Matrix ()
       row_vector_property ylim hlr , Matrix ()
@@ -4356,28 +4373,29 @@
     // properties declarations.
 
     BEGIN_PROPERTIES (text)
-      text_label_property string u , ""
-      radio_property units u , "{data}|pixels|normalized|inches|centimeters|points"
-      array_property position smu , Matrix (1, 3, 0.0)
-      double_property rotation mu , 0
-      radio_property horizontalalignment mu , "{left}|center|right"
+      color_property backgroundcolor , "{none}"
       color_property color u , color_values (0, 0, 0)
+      string_property displayname , ""
+      color_property edgecolor , "{none}"
+      bool_property editing , "off"
+      radio_property erasemode , "{normal}|none|xor|background"
+      array_property extent rG , Matrix (1, 4, 0.0)
+      radio_property fontangle u , "{normal}|italic|oblique"
       string_property fontname u , OCTAVE_DEFAULT_FONTNAME
       double_property fontsize u , 10
-      radio_property fontangle u , "{normal}|italic|oblique"
+      radio_property fontunits , "inches|centimeters|normalized|{points}|pixels"
       radio_property fontweight u , "light|{normal}|demi|bold"
+      radio_property horizontalalignment mu , "{left}|center|right"
       radio_property interpreter u , "{tex}|none|latex"
-      color_property backgroundcolor , "{none}"
-      string_property displayname , ""
-      color_property edgecolor , "{none}"
-      radio_property erasemode , "{normal}|none|xor|background"
-      bool_property editing , "off"
-      radio_property fontunits , "inches|centimeters|normalized|{points}|pixels"
       radio_property linestyle , "{-}|--|:|-.|none"
       double_property linewidth , 0.5
       double_property margin , 1
+      array_property position smu , Matrix (1, 3, 0.0)
+      double_property rotation mu , 0
+      text_label_property string u , ""
+      radio_property units u , "{data}|pixels|normalized|inches|centimeters|points"
       radio_property verticalalignment mu , "top|cap|{middle}|baseline|bottom"
-      array_property extent rG , Matrix (1, 4, 0.0)
+
       // hidden properties for limit computation
       row_vector_property xlim hlr , Matrix ()
       row_vector_property ylim hlr , Matrix ()
@@ -4489,6 +4507,11 @@
   class OCTINTERP_API properties : public base_properties
   {
   public:
+    bool is_aliminclude (void) const
+      { return (aliminclude.is_on () && alphadatamapping.is ("scaled")); }
+    std::string get_aliminclude (void) const
+      { return aliminclude.current_value (); }
+
     bool is_climinclude (void) const
       { return (climinclude.is_on () && cdatamapping.is ("scaled")); }
     std::string get_climinclude (void) const
@@ -4498,19 +4521,25 @@
 
     // See the genprops.awk script for an explanation of the
     // properties declarations.
+    // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (image)
+      array_property alphadata u , Matrix ()
+      radio_property alphadatamapping al , "none|direct|{scaled}"
+      array_property cdata u , Matrix ()
+      radio_property cdatamapping al , "scaled|{direct}"
+      radio_property erasemode , "{normal}|none|xor|background"
       row_vector_property xdata u , Matrix ()
       row_vector_property ydata u , Matrix ()
-      array_property cdata u , Matrix ()
-      radio_property cdatamapping al , "{scaled}|direct"
       // hidden properties for limit computation
+      row_vector_property alim hlr , Matrix ()
+      row_vector_property clim hlr , Matrix ()
       row_vector_property xlim hlr , Matrix ()
       row_vector_property ylim hlr , Matrix ()
-      row_vector_property clim hlr , Matrix ()
+      bool_property aliminclude hlg , "on"
+      bool_property climinclude hlg , "on"
       bool_property xliminclude hl , "on"
       bool_property yliminclude hl , "on"
-      bool_property climinclude hlg , "on"
     END_PROPERTIES
 
   protected:
@@ -4530,6 +4559,22 @@
       }
 
   private:
+    void update_alphadata (void)
+      {
+        if (alphadatamapping_is ("scaled"))
+          set_alim (alphadata.get_limits ());
+        else
+          alim = alphadata.get_limits ();
+      }
+
+    void update_cdata (void)
+      {
+        if (cdatamapping_is ("scaled"))
+          set_clim (cdata.get_limits ());
+        else
+          clim = cdata.get_limits ();
+      }
+
     void update_xdata (void)
     {
       Matrix limits = xdata.get_limits ();
@@ -4550,14 +4595,6 @@
       set_ylim (limits);
     }
 
-    void update_cdata (void)
-      {
-        if (cdatamapping_is ("scaled"))
-          set_clim (cdata.get_limits ());
-        else
-          clim = cdata.get_limits ();
-      }
-
     float pixel_size (octave_idx_type dim, const Matrix limits)
     {
       octave_idx_type l = dim - 1;
@@ -4616,64 +4653,68 @@
   public:
     octave_value get_color_data (void) const;
 
-    bool is_climinclude (void) const
-      { return (climinclude.is_on () && cdatamapping.is ("scaled")); }
-    std::string get_climinclude (void) const
-      { return climinclude.current_value (); }
-
     bool is_aliminclude (void) const
       { return (aliminclude.is_on () && alphadatamapping.is ("scaled")); }
     std::string get_aliminclude (void) const
       { return aliminclude.current_value (); }
 
+    bool is_climinclude (void) const
+      { return (climinclude.is_on () && cdatamapping.is ("scaled")); }
+    std::string get_climinclude (void) const
+      { return climinclude.current_value (); }
+
     // See the genprops.awk script for an explanation of the
     // properties declarations.
+    // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (patch)
-      array_property xdata u , Matrix ()
-      array_property ydata u , Matrix ()
-      array_property zdata u , Matrix ()
+      radio_property alphadatamapping l , "none|{scaled}|direct"
+      double_property ambientstrength , 0.3
+      radio_property backfacelighting , "unlit|lit|{reverselit}"
       array_property cdata u , Matrix ()
       radio_property cdatamapping l , "{scaled}|direct"
+      double_property diffusestrength , 0.6
+      string_property displayname , ""
+      double_radio_property edgealpha , double_radio_property (1.0, radio_values ("flat|interp"))
+      color_property edgecolor , color_property (color_values (0, 0, 0), radio_values ("none|flat|interp"))
+      radio_property edgelighting , "{none}|flat|gouraud|phong"
+      radio_property erasemode , "{normal}|background|xor|none"
+      double_radio_property facealpha , double_radio_property (1.0, radio_values ("flat|interp"))
+      color_property facecolor , color_property (color_values (0, 0, 0), radio_values ("none|flat|interp"))
+      radio_property facelighting , "{none}|flat|gouraud|phong"
       array_property faces , Matrix ()
       array_property facevertexalphadata , Matrix ()
       array_property facevertexcdata , Matrix ()
-      array_property vertices , Matrix ()
-      array_property vertexnormals , Matrix ()
-      radio_property normalmode , "{auto}|manual"
-      color_property facecolor , color_property (color_values (0, 0, 0), radio_values ("flat|none|interp"))
-      double_radio_property facealpha , double_radio_property (1.0, radio_values ("flat|interp"))
-      radio_property facelighting , "flat|{none}|gouraud|phong"
-      color_property edgecolor , color_property (color_values (0, 0, 0), radio_values ("flat|none|interp"))
-      double_radio_property edgealpha , double_radio_property (1.0, radio_values ("flat|interp"))
-      radio_property edgelighting , "{none}|flat|gouraud|phong"
-      radio_property backfacelighting , "{reverselit}|unlit|lit"
-      double_property ambientstrength , 0.3
-      double_property diffusestrength , 0.6
-      double_property specularstrength , 0.6
-      double_property specularexponent , 10.0
-      double_property specularcolorreflectance , 1.0
-      radio_property erasemode , "{normal}|background|xor|none"
+      // FIXME: interpreter is not a property of a Matlab patch.
+      //        Octave uses this for legend() with the string displayname.
+      radio_property interpreter , "{tex}|none|latex"
       radio_property linestyle , "{-}|--|:|-.|none"
       double_property linewidth , 0.5
-      radio_property marker , "{none}|s|o|x|+|.|*|<|>|v|^|d|p|h|@"
-      color_property markeredgecolor , "{auto}|none|flat"
-      color_property markerfacecolor , "auto|{none}|flat"
+      radio_property marker , "{none}|+|o|*|.|x|s|d|^|v|>|<|p|h"
+      color_property markeredgecolor , "none|{auto}|flat"
+      color_property markerfacecolor , "{none}|auto|flat"
       double_property markersize , 6
-      radio_property interpreter , "{tex}|none|latex"
-      string_property displayname , ""
-      radio_property alphadatamapping l , "none|{scaled}|direct"
+      radio_property normalmode , "{auto}|manual"
+      double_property specularcolorreflectance , 1.0
+      double_property specularexponent , 10.0
+      double_property specularstrength , 0.6
+      array_property vertexnormals , Matrix ()
+      array_property vertices , Matrix ()
+      array_property xdata u , Matrix ()
+      array_property ydata u , Matrix ()
+      array_property zdata u , Matrix ()
+
       // hidden properties for limit computation
+      row_vector_property alim hlr , Matrix ()
+      row_vector_property clim hlr , Matrix ()
       row_vector_property xlim hlr , Matrix ()
       row_vector_property ylim hlr , Matrix ()
       row_vector_property zlim hlr , Matrix ()
-      row_vector_property clim hlr , Matrix ()
-      row_vector_property alim hlr , Matrix ()
+      bool_property aliminclude hlg , "on"
+      bool_property climinclude hlg , "on"
       bool_property xliminclude hl , "on"
       bool_property yliminclude hl , "on"
       bool_property zliminclude hl , "on"
-      bool_property climinclude hlg , "on"
-      bool_property aliminclude hlg , "on"
     END_PROPERTIES
 
   protected:
@@ -4734,66 +4775,70 @@
   public:
     octave_value get_color_data (void) const;
 
-    bool is_climinclude (void) const
-      { return (climinclude.is_on () && cdatamapping.is ("scaled")); }
-    std::string get_climinclude (void) const
-      { return climinclude.current_value (); }
-
     bool is_aliminclude (void) const
       { return (aliminclude.is_on () && alphadatamapping.is ("scaled")); }
     std::string get_aliminclude (void) const
       { return aliminclude.current_value (); }
 
+    bool is_climinclude (void) const
+      { return (climinclude.is_on () && cdatamapping.is ("scaled")); }
+    std::string get_climinclude (void) const
+      { return climinclude.current_value (); }
+
     // See the genprops.awk script for an explanation of the
     // properties declarations.
+    // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (surface)
-      array_property xdata u , Matrix ()
-      array_property ydata u , Matrix ()
-      array_property zdata u , Matrix ()
-      array_property cdata u , Matrix ()
-      radio_property cdatamapping al , "{scaled}|direct"
-      string_property xdatasource , ""
-      string_property ydatasource , ""
-      string_property zdatasource , ""
-      string_property cdatasource , ""
-      color_property facecolor , "{flat}|none|interp|texturemap"
-      double_radio_property facealpha , double_radio_property (1.0, radio_values ("flat|interp"))
-      color_property edgecolor , color_property (color_values (0, 0, 0), radio_values ("flat|none|interp"))
-      radio_property linestyle , "{-}|--|:|-.|none"
-      double_property linewidth , 0.5
-      radio_property marker , "{none}|s|o|x|+|.|*|<|>|v|^|d|p|h|@"
-      color_property markeredgecolor , "{auto}|none"
-      color_property markerfacecolor , "auto|{none}"
-      double_property markersize , 6
-      radio_property interpreter , "{tex}|none|latex"
-      string_property displayname , ""
       array_property alphadata u , Matrix ()
       radio_property alphadatamapping l , "none|direct|{scaled}"
       double_property ambientstrength , 0.3
       radio_property backfacelighting , "unlit|lit|{reverselit}"
+      array_property cdata u , Matrix ()
+      radio_property cdatamapping al , "{scaled}|direct"
+      string_property cdatasource , ""
       double_property diffusestrength , 0.6
+      string_property displayname , ""
       double_radio_property edgealpha , double_radio_property (1.0, radio_values ("flat|interp"))
+      color_property edgecolor , color_property (color_values (0, 0, 0), radio_values ("none|flat|interp"))
       radio_property edgelighting , "{none}|flat|gouraud|phong"
       radio_property erasemode , "{normal}|none|xor|background"
+      double_radio_property facealpha , double_radio_property (1.0, radio_values ("flat|interp|texturemap"))
+      color_property facecolor , "none|{flat}|interp|texturemap"
       radio_property facelighting , "{none}|flat|gouraud|phong"
+      // FIXME: interpreter is not a Matlab surface property
+      //        Octave uses this for legend() with the string displayname.
+      radio_property interpreter , "{tex}|none|latex"
+      radio_property linestyle , "{-}|--|:|-.|none"
+      double_property linewidth , 0.5
+      radio_property marker , "{none}|+|o|*|.|x|s|d|^|v|>|<|p|h"
+      color_property markeredgecolor , "none|{auto}|flat"
+      color_property markerfacecolor , "{none}|auto|flat"
+      double_property markersize , 6
       radio_property meshstyle , "{both}|row|column"
       radio_property normalmode u , "{auto}|manual"
       double_property specularcolorreflectance , 1
       double_property specularexponent , 10
       double_property specularstrength , 0.9
       array_property vertexnormals u , Matrix ()
+      array_property xdata u , Matrix ()
+      string_property xdatasource , ""
+      array_property ydata u , Matrix ()
+      string_property ydatasource , ""
+      array_property zdata u , Matrix ()
+      string_property zdatasource , ""
+
       // hidden properties for limit computation
+      row_vector_property alim hlr , Matrix ()
+      row_vector_property clim hlr , Matrix ()
       row_vector_property xlim hlr , Matrix ()
       row_vector_property ylim hlr , Matrix ()
       row_vector_property zlim hlr , Matrix ()
-      row_vector_property clim hlr , Matrix ()
-      row_vector_property alim hlr , Matrix ()
+      bool_property aliminclude hlg , "on"
+      bool_property climinclude hlg , "on"
       bool_property xliminclude hl , "on"
       bool_property yliminclude hl , "on"
       bool_property zliminclude hl , "on"
-      bool_property climinclude hlg , "on"
-      bool_property aliminclude hlg , "on"
     END_PROPERTIES
 
   protected:
@@ -4815,7 +4860,21 @@
       }
 
   private:
-    void update_normals (void);
+    void update_alphadata (void)
+      {
+        if (alphadatamapping_is ("scaled"))
+          set_alim (alphadata.get_limits ());
+        else
+          alim = alphadata.get_limits ();
+      }
+
+    void update_cdata (void)
+      {
+        if (cdatamapping_is ("scaled"))
+          set_clim (cdata.get_limits ());
+        else
+          clim = cdata.get_limits ();
+      }
 
     void update_xdata (void)
       {
@@ -4835,21 +4894,7 @@
         set_zlim (zdata.get_limits ());
       }
 
-    void update_cdata (void)
-      {
-        if (cdatamapping_is ("scaled"))
-          set_clim (cdata.get_limits ());
-        else
-          clim = cdata.get_limits ();
-      }
-
-    void update_alphadata (void)
-      {
-        if (alphadatamapping_is ("scaled"))
-          set_alim (alphadata.get_limits ());
-        else
-          alim = alphadata.get_limits ();
-      }
+    void update_normals (void);
 
     void update_normalmode (void)
       { update_normals (); }
@@ -4900,21 +4945,23 @@
 
     // See the genprops.awk script for an explanation of the
     // properties declarations.
+    // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (hggroup)
       string_property displayname , ""
       radio_property erasemode , "{normal}|none|xor|background"
+
       // hidden properties for limit computation
+      row_vector_property alim hr , Matrix ()
+      row_vector_property clim hr , Matrix ()
       row_vector_property xlim hr , Matrix ()
       row_vector_property ylim hr , Matrix ()
       row_vector_property zlim hr , Matrix ()
-      row_vector_property clim hr , Matrix ()
-      row_vector_property alim hr , Matrix ()
+      bool_property aliminclude h , "on"
+      bool_property climinclude h , "on"
       bool_property xliminclude h , "on"
       bool_property yliminclude h , "on"
       bool_property zliminclude h , "on"
-      bool_property climinclude h , "on"
-      bool_property aliminclude h , "on"
     END_PROPERTIES
 
   private:
@@ -4973,6 +5020,7 @@
 
     // See the genprops.awk script for an explanation of the
     // properties declarations.
+    // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (uimenu)
       any_property __object__ , Matrix ()
@@ -4984,6 +5032,7 @@
       string_property label , ""
       double_property position , 9
       bool_property separator , "off"
+      // Octave-specific properties
       string_property fltk_label h , ""
     END_PROPERTIES
 
@@ -5022,6 +5071,7 @@
   public:
     // See the genprops.awk script for an explanation of the
     // properties declarations.
+    // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (uicontextmenu)
       any_property __object__ , Matrix ()
@@ -5073,6 +5123,7 @@
 
     // See the genprops.awk script for an explanation of the
     // properties declarations.
+    // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (uicontrol)
       any_property __object__ , Matrix ()
@@ -5088,7 +5139,7 @@
       radio_property fontunits S , "inches|centimeters|normalized|{points}|pixels"
       radio_property fontweight u , "light|{normal}|demi|bold"
       color_property foregroundcolor , color_values (0, 0, 0)
-      radio_property horizontalalignment , "{left}|center|right"
+      radio_property horizontalalignment , "left|{center}|right"
       callback_property keypressfcn , Matrix ()
       double_property listboxtop , 1
       double_property max , 1
@@ -5165,6 +5216,7 @@
 
     // See the genprops.awk script for an explanation of the
     // properties declarations.
+    // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (uipanel)
       any_property __object__ , Matrix ()
@@ -5226,6 +5278,7 @@
   public:
     // See the genprops.awk script for an explanation of the
     // properties declarations.
+    // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (uitoolbar)
       any_property __object__ , Matrix ()
@@ -5314,6 +5367,7 @@
   public:
     // See the genprops.awk script for an explanation of the
     // properties declarations.
+    // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (uipushtool)
       any_property __object__ , Matrix ()
@@ -5364,6 +5418,7 @@
   public:
     // See the genprops.awk script for an explanation of the
     // properties declarations.
+    // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (uitoggletool)
       any_property __object__ , Matrix ()
--- a/libinterp/corefcn/qz.cc
+++ b/libinterp/corefcn/qz.cc
@@ -367,7 +367,7 @@
 @end enumerate\n\
 \n\
 Note: @code{qz} performs permutation balancing, but not scaling\n\
-(@pxref{docXbalance}).  The order of output arguments was selected for\n\
+(@pxref{XREFbalance}).  The order of output arguments was selected for\n\
 compatibility with @sc{matlab}.\n\
 @seealso{eig, balance, lu, chol, hess, qr, qzhess, schur, svd}\n\
 @end deftypefn")
--- a/libinterp/corefcn/regexp.cc
+++ b/libinterp/corefcn/regexp.cc
@@ -1072,7 +1072,7 @@
 \n\
 Case insensitive regular expression string matching.  Search for @var{pat} in\n\
 @var{str} and return the positions and substrings of any matches, or empty\n\
-values if there are none.  @xref{docXregexp,,regexp}, for details on the\n\
+values if there are none.  @xref{XREFregexp,,regexp}, for details on the\n\
 syntax of the search pattern.\n\
 @seealso{regexp}\n\
 @end deftypefn")
@@ -1284,7 +1284,7 @@
 Replace occurrences of pattern @var{pat} in @var{string} with @var{repstr}.\n\
 \n\
 The pattern is a regular expression as documented for @code{regexp}.\n\
-@xref{docXregexp,,regexp}.\n\
+@xref{XREFregexp,,regexp}.\n\
 \n\
 The replacement string may contain @code{$i}, which substitutes\n\
 for the ith set of parentheses in the match string.  For example,\n\
--- a/libinterp/dldfcn/__init_fltk__.cc
+++ b/libinterp/dldfcn/__init_fltk__.cc
@@ -662,10 +662,10 @@
   friend class fltk_uimenu;
 public:
   plot_window (int xx, int yy, int ww, int hh, figure::properties& xfp)
-    : Fl_Window (xx, yy, ww, hh, "octave"), window_label (), shift (0),
-      ndim (2), fp (xfp), canvas (0), autoscale (0), togglegrid (0),
-      panzoom (0), rotate (0), help (0), status (0),
-      ax_obj (), pos_x (0), pos_y (0)
+    : Fl_Window (xx, yy - menu_h, ww, hh + menu_h + status_h, "octave"),
+      window_label (), shift (0), ndim (2), fp (xfp), canvas (0),
+      autoscale (0), togglegrid (0), panzoom (0), rotate (0), help (0),
+      status (0), ax_obj (), pos_x (0), pos_y (0)
   {
     callback (window_close, static_cast<void*> (this));
     size_range (4*status_h, 2*status_h);
@@ -680,32 +680,40 @@
 
     begin ();
     {
+      //Fl_Window::resize (xx, yy - menu_h, ww, hh + menu_h + status_h);
+      
+      // bbox of plot canvas = [xx, yy, ww, hh];
+      // (xx, yy) = UL coordinate relative to UL window.
 
-      canvas = new OpenGL_fltk (0, 0, ww, hh - status_h, number ());
+      canvas = new OpenGL_fltk (0, menu_h, ww, hh, number ());
 
       uimenu = new fltk_uimenu (0, 0, ww, menu_h);
       uimenu->hide ();
 
-      bottom = new Fl_Box (0, hh - status_h, ww, status_h);
+      // Toolbar is a composite of "bottom", "autoscale", "togglegrid",
+      // "panzoom", "rotate", "help", and "status".
+
+      yy = hh + menu_h;
+      bottom = new Fl_Box (0, yy, ww, status_h);
       bottom->box (FL_FLAT_BOX);
 
       ndim = calc_dimensions (gh_manager::get_object (fp.get___myhandle__ ()));
 
-      autoscale = new Fl_Button (0, hh - status_h, status_h, status_h, "A");
+      autoscale = new Fl_Button (0, yy, status_h, status_h, "A");
       autoscale->callback (button_callback, static_cast<void*> (this));
       autoscale->tooltip ("Autoscale");
 
-      togglegrid = new Fl_Button (status_h, hh - status_h, status_h,
+      togglegrid = new Fl_Button (status_h, yy, status_h,
                                   status_h, "G");
       togglegrid->callback (button_callback, static_cast<void*> (this));
       togglegrid->tooltip ("Toggle Grid");
 
-      panzoom = new Fl_Button (2 * status_h, hh - status_h, status_h,
+      panzoom = new Fl_Button (2 * status_h, yy, status_h,
                                status_h, "P");
       panzoom->callback (button_callback, static_cast<void*> (this));
       panzoom->tooltip ("Mouse Pan/Zoom");
 
-      rotate = new Fl_Button (3 * status_h, hh - status_h, status_h,
+      rotate = new Fl_Button (3 * status_h, yy, status_h,
                               status_h, "R");
       rotate->callback (button_callback, static_cast<void*> (this));
       rotate->tooltip ("Mouse Rotate");
@@ -713,12 +721,12 @@
       if (ndim == 2)
         rotate->deactivate ();
 
-      help = new Fl_Button (4 * status_h, hh - status_h, status_h,
+      help = new Fl_Button (4 * status_h, yy, status_h,
                             status_h, "?");
       help->callback (button_callback, static_cast<void*> (this));
       help->tooltip ("Help");
 
-      status = new Fl_Output (5 * status_h, hh - status_h,
+      status = new Fl_Output (5 * status_h, yy,
                               ww > 2*status_h ? ww - status_h : 0,
                               status_h, "");
 
@@ -799,10 +807,7 @@
   {
     if (!uimenu->is_visible ())
       {
-        canvas->resize (canvas->x (),
-                        canvas->y () + menu_h,
-                        canvas->w (),
-                        canvas->h () - menu_h);
+        // FIXME - Toolbar and menubar do not update
         uimenu->show ();
         mark_modified ();
       }
@@ -812,10 +817,7 @@
   {
     if (uimenu->is_visible ())
       {
-        canvas->resize (canvas->x (),
-                        canvas->y () - menu_h,
-                        canvas->w (),
-                        canvas->h () + menu_h);
+        // FIXME - Toolbar and menubar do not update
         uimenu->hide ();
         mark_modified ();
       }
@@ -1108,6 +1110,7 @@
       {
         Matrix pos (1,2,0);
         pos(0) = px;
+        // FIXME - only works if (uimenu->is_visible ()) ?
         pos(1) = h () - status_h - menu_h - py;
         fp.set_currentpoint (pos);
       }
@@ -1181,17 +1184,48 @@
 
     Matrix pos (1,4,0);
     pos(0) = xx;
-    pos(1) = yy;
+    pos(1) = yy + menu_h;
     pos(2) = ww;
-    pos(3) = hh - status_h - menu_h;
+    pos(3) = hh - menu_h - status_h;
+    if (! uimenu->is_visible ())
+      {
+        pos(1) = yy;
+        pos(3) = hh - status_h;
+      }
 
     fp.set_boundingbox (pos, true);
   }
 
   void draw (void)
   {
+    // FIXME - Toolbar and menubar do not update properly
     Matrix pos = fp.get_boundingbox (true);
-    Fl_Window::resize (pos(0), pos(1), pos(2), pos(3) + status_h + menu_h);
+    int canvas_h = pos(3);
+    int canvas_w = pos(2);
+    int canvas_y = menu_h;
+    int toolbar_y = menu_h + canvas_h;
+    pos(1) = pos(1) - menu_h;
+    pos(3) = pos(3) + menu_h + status_h;
+
+    if (! uimenu->is_visible ())
+      {
+        pos(1) = pos(1) + menu_h;
+        pos(3) = pos(3) - menu_h;
+        toolbar_y = toolbar_y - menu_h;
+        canvas_y = canvas_y - menu_h;
+      }
+
+    Fl_Window::resize (pos(0), pos(1), pos(2), pos(3));
+
+    bottom->resize (0, toolbar_y, status_h, status_h);
+    autoscale->resize (0, toolbar_y, status_h, status_h);
+    togglegrid->resize (status_h, toolbar_y, status_h, status_h);
+    panzoom->resize (2 * status_h, toolbar_y, status_h, status_h);
+    rotate->resize (3 * status_h, toolbar_y, status_h, status_h);
+    help->resize (4 * status_h, toolbar_y, status_h, status_h);
+    status->resize (5 * status_h, toolbar_y, pos(2) - 4 * status_h, status_h);
+    if (canvas->valid ())
+      canvas->resize (0, canvas_y, canvas_w, canvas_h);
 
     return Fl_Window::draw ();
   }
--- a/libinterp/dldfcn/__magick_read__.cc
+++ b/libinterp/dldfcn/__magick_read__.cc
@@ -44,30 +44,69 @@
 #include <Magick++.h>
 #include <clocale>
 
+static std::map<std::string, octave_idx_type>
+calculate_region (const octave_scalar_map& options)
+{
+  std::map<std::string, octave_idx_type> region;
+  const Cell pixel_region = options.getfield ("region").cell_value ();
+
+  // Subtract 1 to account for 0 indexing.
+  const Range rows     = pixel_region (0).range_value ();
+  const Range cols     = pixel_region (1).range_value ();
+  region["row_start"]  = rows.base () -1;
+  region["col_start"]  = cols.base () -1;
+  region["row_end"]    = rows.limit () -1;
+  region["col_end"]    = cols.limit () -1;
+
+  // Length of the area to load into the Image Pixel Cache
+  region["row_cache"] = region["row_end"] - region["row_start"] +1;
+  region["col_cache"] = region["col_end"] - region["col_start"] +1;
+
+  // How much we have to shift in the memory when doing the loops.
+  region["row_shift"] = region["col_cache"] * rows.inc ();
+  region["col_shift"] = region["col_cache"] * region["row_cache"] - cols.inc ();
+
+  // The actual height and width of the output image
+  region["row_out"] = floor ((region["row_end"] - region["row_start"]) / rows.inc ()) + 1;
+  region["col_out"] = floor ((region["col_end"] - region["col_start"]) / cols.inc ()) + 1;
+
+  return region;
+}
+
 template <class T>
 static octave_value_list
 read_indexed_images (std::vector<Magick::Image>& imvec,
                      const Array<octave_idx_type>& frameidx,
-                     const octave_idx_type nargout)
+                     const octave_idx_type nargout,
+                     const octave_scalar_map& options)
 {
   typedef typename T::element_type P;
 
-  octave_value_list retval;
+  octave_value_list retval (3, Matrix ());
 
-  const octave_idx_type nRows    = imvec[0].baseRows ();
-  const octave_idx_type nCols    = imvec[0].baseColumns ();
-  const octave_idx_type nFrames  = frameidx.length ();
+  std::map<std::string, octave_idx_type> region = calculate_region (options);
+  const octave_idx_type nFrames = frameidx.length ();
+  const octave_idx_type nRows = region["row_out"];
+  const octave_idx_type nCols = region["col_out"];
 
   T img       = T (dim_vector (nRows, nCols, 1, nFrames));
   P* img_fvec = img.fortran_vec ();
 
+  const octave_idx_type row_start  = region["row_start"];
+  const octave_idx_type col_start  = region["col_start"];
+  const octave_idx_type row_shift  = region["row_shift"];
+  const octave_idx_type col_shift  = region["col_shift"];
+  const octave_idx_type row_cache  = region["row_cache"];
+  const octave_idx_type col_cache  = region["col_cache"];
+
   // When reading PixelPackets from the Image Pixel Cache, they come in
   // row major order. So we keep moving back and forth there so we can
   // write the image in column major order.
   octave_idx_type idx = 0;
   for (octave_idx_type frame = 0; frame < nFrames; frame++)
     {
-      imvec[frameidx(frame)].getConstPixels (0, 0, nCols, nRows);
+      imvec[frameidx(frame)].getConstPixels (col_start, row_start,
+                                             col_cache, row_cache);
 
       const Magick::IndexPacket *pix
         = imvec[frameidx(frame)].getConstIndexes ();
@@ -77,9 +116,9 @@
           for (octave_idx_type row = 0; row < nRows; row++)
             {
               img_fvec[idx++] = static_cast<P> (*pix);
-              pix += nCols;
+              pix += row_shift;
             }
-          pix -= nCols * nRows -1;
+          pix -= col_shift;
         }
     }
   retval(0) = octave_value (img);
@@ -89,7 +128,6 @@
     {
       const octave_idx_type mapsize = imvec[0].colorMapSize ();
       Matrix cmap                   = Matrix (mapsize, 3);
-      NDArray alpha;
 
       // In theory, it should be possible for each frame of an image to
       // have different colormaps but for Matlab compatibility, we only
@@ -108,7 +146,7 @@
               amap(i,0) = c.alpha ();
             }
 
-          alpha.resize (dim_vector (nRows, nCols, 1, nFrames));
+          NDArray alpha (dim_vector (nRows, nCols, 1, nFrames));
           const octave_idx_type nPixels = alpha.numel ();
 
           double* alpha_fvec = alpha.fortran_vec ();
@@ -121,6 +159,7 @@
               alpha_fvec[idx] = abs (amap(img(idx), 0) - 1);
               idx++;
             }
+          retval(2) = alpha;
         }
 
       else
@@ -135,188 +174,332 @@
         }
 
       retval(1) = cmap;
-      retval(2) = alpha;
     }
 
   return retval;
 }
 
+// This function is highly repetitive, a bunch of for loops that are
+// very similar to account for different image types. They are different
+// enough that trying to reduce the copy and paste would decrease its
+// readability too much.
 template <class T>
 octave_value_list
-read_images (const std::vector<Magick::Image>& imvec,
-             const Array<int>& frameidx, unsigned int depth)
+read_images (std::vector<Magick::Image>& imvec,
+             const Array<octave_idx_type>& frameidx,
+             const octave_idx_type nargout,
+             const octave_scalar_map& options)
 {
   typedef typename T::element_type P;
 
   octave_value_list retval (3, Matrix ());
 
-  T im;
+  std::map<std::string, octave_idx_type> region = calculate_region (options);
+  const octave_idx_type nFrames = frameidx.length ();
+  const octave_idx_type nRows = region["row_out"];
+  const octave_idx_type nCols = region["col_out"];
+  T img;
+
+  const octave_idx_type row_start  = region["row_start"];
+  const octave_idx_type col_start  = region["col_start"];
+  const octave_idx_type row_shift  = region["row_shift"];
+  const octave_idx_type col_shift  = region["col_shift"];
+  const octave_idx_type row_cache  = region["row_cache"];
+  const octave_idx_type col_cache  = region["col_cache"];
 
-  const int rows    = imvec[0].baseRows ();
-  const int columns = imvec[0].baseColumns ();
-  const int nframes = frameidx.length ();
+  // GraphicsMagick (GM) keeps the image values in memory using whatever
+  // QuantumDepth it was built with independently of the original image
+  // bitdepth. Basically this means that if GM was built with quantum 16
+  // all values are scaled in the uint16 range. If the original image
+  // had an 8 bit depth, we need to rescale it for that range.
+  // However, if the image had a bitdepth of 32, then we will be returning
+  // a floating point image. In this case, the values need to be rescaled
+  // for the range [0 1] (this is what Matlab has documented on the page
+  // about image types but in some cases seems to be doing something else.
+  // See bug #39249).
+  // Finally, we must do the division ourselves (set a divisor) instead of
+  // using quantumOperator for the cases where we will be returning floating
+  // point and want things in the range [0 1]. This is the same reason why
+  // the divisor is of type double.
+  const double divisor = (imvec[0].depth () == 32) ?
+                         std::numeric_limits<uint32_t>::max () :
+                         ((uint64_t (1) << QuantumDepth) - 1) / 
+                         ((uint64_t (1) << imvec[0].depth ()) - 1);
 
-  dim_vector idim = dim_vector (rows, columns, 1, nframes);
-
+  // FIXME: this workaround should probably be fixed in GM by creating a
+  //        new ImageType BilevelMatteType
+  // Despite what GM documentation claims, opacity is not only on the types
+  // with Matte on the name. It is possible that an image is completely
+  // black (1 color), and have a second channel set for transparency (2nd
+  // color). Its type will be bilevel since there is no BilevelMatte. The
+  // only way to check for this seems to be by checking matte ().
   Magick::ImageType type = imvec[0].type ();
-  const int divisor = ((uint64_t (1) << QuantumDepth) - 1) / 
-                      ((uint64_t (1) << depth) - 1);
+  if (type == Magick::BilevelType && imvec[0].matte ())
+    {
+      type = Magick::GrayscaleMatteType;
+    }
+
+  // If the alpha channel was not requested, treat images as if
+  // it doesn't exist.
+  if (nargout < 3)
+    {
+      switch (type)
+        {
+        case Magick::GrayscaleMatteType:
+          {
+            type = Magick::GrayscaleType;
+            break;
+          }
+        case Magick::PaletteMatteType:
+          {
+            type = Magick::PaletteType;
+            break;
+          }
+        case Magick::TrueColorMatteType:
+          {
+            type = Magick::TrueColorType;
+            break;
+          }
+        case Magick::ColorSeparationMatteType:
+          {
+            type = Magick::ColorSeparationType;
+            break;
+          }
+        default:
+          {
+            // do nothing, other than silencing warnings about enumeration
+            // values not being handled in switch.
+          }
+        }
+    }
 
   switch (type)
     {
     case Magick::BilevelType:           // Monochrome bi-level image
     case Magick::GrayscaleType:         // Grayscale image
       {
-        im = T (idim);
-        P *vec = im.fortran_vec ();
+        img = T (dim_vector (nRows, nCols, 1, nFrames));
+        P *img_fvec = img.fortran_vec ();
 
-        for (int frame = 0; frame < nframes; frame++)
+        octave_idx_type idx = 0;
+        for (octave_idx_type frame = 0; frame < nFrames; frame++)
           {
             const Magick::PixelPacket *pix
-              = imvec[frameidx(frame)].getConstPixels (0, 0, columns, rows);
+              = imvec[frameidx(frame)].getConstPixels (col_start, row_start,
+                                                       col_cache, row_cache);
 
-            P *rbuf = vec;
-            for (int y = 0; y < rows; y++)
+            for (octave_idx_type col = 0; col < nCols; col++)
               {
-                for (int x = 0; x < columns; x++)
+                for (octave_idx_type row = 0; row < nRows; row++)
                   {
-                    *rbuf = pix->red / divisor;
-                    pix++;
-                    rbuf += rows;
+                    img_fvec[idx++] = pix->red / divisor;
+                    pix += row_shift;
                   }
-                rbuf -= rows * columns - 1;
+                pix -= col_shift;
               }
-
-            // Next frame.
-            vec += rows * columns * idim(2);
           }
-        }
-      break;
+        break;
+      }
 
     case Magick::GrayscaleMatteType:    // Grayscale image with opacity
       {
-        idim(2) = 2;
-        im = T (idim);
-        P *vec = im.fortran_vec ();
+        img   = T (dim_vector (nRows, nCols, 1, nFrames));
+        T alpha   (dim_vector (nRows, nCols, 1, nFrames));
+        P *img_fvec = img.fortran_vec ();
+        P *a_fvec   = alpha.fortran_vec ();
 
-        for (int frame = 0; frame < nframes; frame++)
+        octave_idx_type idx = 0;
+        for (octave_idx_type frame = 0; frame < nFrames; frame++)
           {
             const Magick::PixelPacket *pix
-              = imvec[frameidx(frame)].getConstPixels (0, 0, columns, rows);
+              = imvec[frameidx(frame)].getConstPixels (col_start, row_start,
+                                                       col_cache, row_cache);
 
-            P *rbuf = vec;
-            P *obuf = vec + rows * columns;
-            for (int y = 0; y < rows; y++)
+            for (octave_idx_type col = 0; col < nCols; col++)
               {
-                for (int x = 0; x < columns; x++)
+                for (octave_idx_type row = 0; row < nRows; row++)
                   {
-                    *rbuf = pix->red / divisor;
-                    *obuf = pix->opacity / divisor;
-                    pix++;
-                    rbuf += rows;
-                    obuf += rows;
+                    img_fvec[idx] = pix->red / divisor;
+                    a_fvec[idx]   = pix->opacity / divisor;
+                    pix += row_shift;
+                    idx++;
                   }
-                rbuf -= rows * columns - 1;
-                obuf -= rows * columns - 1;
+                pix -= col_shift;
               }
-
-            // Next frame.
-            vec += rows * columns * idim(2);
           }
-        }
-      break;
+        retval(2) = alpha;
+        break;
+      }
 
     case Magick::PaletteType:           // Indexed color (palette) image
     case Magick::TrueColorType:         // Truecolor image
       {
-        idim(2) = 3;
-        im = T (idim);
-        P *vec = im.fortran_vec ();
+        img = T (dim_vector (nRows, nCols, 3, nFrames));
+        P *img_fvec = img.fortran_vec ();
 
-        for (int frame = 0; frame < nframes; frame++)
+        for (octave_idx_type frame = 0; frame < nFrames; frame++)
           {
             const Magick::PixelPacket *pix
-              = imvec[frameidx(frame)].getConstPixels (0, 0, columns, rows);
+              = imvec[frameidx(frame)].getConstPixels (col_start, row_start,
+                                                       col_cache, row_cache);
 
-            P *rbuf = vec;
-            P *gbuf = vec + rows * columns;
-            P *bbuf = vec + rows * columns * 2;
-            for (int y = 0; y < rows; y++)
+            octave_idx_type idx = 0;
+            img_fvec += nRows * nCols * frame;
+            P *rbuf   = img_fvec;
+            P *gbuf   = img_fvec + nRows * nCols;
+            P *bbuf   = img_fvec + nRows * nCols * 2;
+
+            for (octave_idx_type col = 0; col < nCols; col++)
               {
-                for (int x = 0; x < columns; x++)
+                for (octave_idx_type row = 0; row < nRows; row++)
                   {
-                    *rbuf = pix->red / divisor;
-                    *gbuf = pix->green / divisor;
-                    *bbuf = pix->blue / divisor;
-                    pix++;
-                    rbuf += rows;
-                    gbuf += rows;
-                    bbuf += rows;
+                    rbuf[idx] = pix->red   / divisor;
+                    gbuf[idx] = pix->green / divisor;
+                    bbuf[idx] = pix->blue  / divisor;
+                    pix += row_shift;
+                    idx++;
                   }
-                rbuf -= rows * columns - 1;
-                gbuf -= rows * columns - 1;
-                bbuf -= rows * columns - 1;
+                pix -= col_shift;
               }
-
-            // Next frame.
-            vec += rows * columns * idim(2);
           }
-        }
-      break;
+        break;
+      }
 
     case Magick::PaletteMatteType:      // Indexed color (palette) image with opacity
     case Magick::TrueColorMatteType:    // Truecolor image with opacity
+      {
+        img   = T (dim_vector (nRows, nCols, 3, nFrames));
+        T alpha   (dim_vector (nRows, nCols, 1, nFrames));
+        P *img_fvec = img.fortran_vec ();
+        P *a_fvec   = alpha.fortran_vec ();
+
+        // Unlike the index for the other channels, this one won't need
+        // to be reset on each frame since it's a separate matrix.
+        octave_idx_type a_idx = 0;
+        for (octave_idx_type frame = 0; frame < nFrames; frame++)
+          {
+            const Magick::PixelPacket *pix
+              = imvec[frameidx(frame)].getConstPixels (col_start, row_start,
+                                                       col_cache, row_cache);
+
+            octave_idx_type idx = 0;
+            img_fvec += nRows * nCols * frame;
+            P *rbuf   = img_fvec;
+            P *gbuf   = img_fvec + nRows * nCols;
+            P *bbuf   = img_fvec + nRows * nCols * 2;
+
+            for (octave_idx_type col = 0; col < nCols; col++)
+              {
+                for (octave_idx_type row = 0; row < nRows; row++)
+                  {
+                    rbuf[idx]     = pix->red     / divisor;
+                    gbuf[idx]     = pix->green   / divisor;
+                    bbuf[idx]     = pix->blue    / divisor;
+                    a_fvec[a_idx] = pix->opacity / divisor;
+                    pix += row_shift;
+                    idx++;
+                    a_idx++;
+                  }
+                pix -= col_shift;
+              }
+          }
+        retval(2) = alpha;
+        break;
+      }
+
     case Magick::ColorSeparationType:   // Cyan/Yellow/Magenta/Black (CYMK) image
       {
-        idim(2) = 4;
-        im = T (idim);
-        P *vec = im.fortran_vec ();
+        img   = T (dim_vector (nRows, nCols, 4, nFrames));
+        P *img_fvec = img.fortran_vec ();
 
-        for (int frame = 0; frame < nframes; frame++)
+        for (octave_idx_type frame = 0; frame < nFrames; frame++)
           {
             const Magick::PixelPacket *pix
-              = imvec[frameidx(frame)].getConstPixels (0, 0, columns, rows);
+              = imvec[frameidx(frame)].getConstPixels (col_start, row_start,
+                                                       col_cache, row_cache);
 
-            P *rbuf = vec;
-            P *gbuf = vec + rows * columns;
-            P *bbuf = vec + rows * columns * 2;
-            P *obuf = vec + rows * columns * 3;
-            for (int y = 0; y < rows; y++)
+            octave_idx_type idx = 0;
+            img_fvec += nRows * nCols * frame;
+            P *cbuf   = img_fvec;
+            P *mbuf   = img_fvec + nRows * nCols;
+            P *ybuf   = img_fvec + nRows * nCols * 2;
+            P *kbuf   = img_fvec + nRows * nCols * 3;
+
+            for (octave_idx_type col = 0; col < nCols; col++)
               {
-                for (int x = 0; x < columns; x++)
+                for (octave_idx_type row = 0; row < nRows; row++)
                   {
-                    *rbuf = pix->red / divisor;
-                    *gbuf = pix->green / divisor;
-                    *bbuf = pix->blue / divisor;
-                    *obuf = pix->opacity / divisor;
-                    pix++;
-                    rbuf += rows;
-                    gbuf += rows;
-                    bbuf += rows;
-                    obuf += rows;
+                    cbuf[idx] = pix->red     / divisor;
+                    mbuf[idx] = pix->green   / divisor;
+                    ybuf[idx] = pix->blue    / divisor;
+                    kbuf[idx] = pix->opacity / divisor;
+                    pix += row_shift;
+                    idx++;
                   }
-                rbuf -= rows * columns - 1;
-                gbuf -= rows * columns - 1;
-                bbuf -= rows * columns - 1;
-                obuf -= rows * columns - 1;
+                pix -= col_shift;
               }
+          }
+        break;
+      }
+
+    // Cyan, magenta, yellow, and black with alpha (opacity) channel
+    case Magick::ColorSeparationMatteType:
+      {
+        img   = T (dim_vector (nRows, nCols, 4, nFrames));
+        T alpha   (dim_vector (nRows, nCols, 1, nFrames));
+        P *img_fvec = img.fortran_vec ();
+        P *a_fvec   = alpha.fortran_vec ();
+
+        // Unlike the index for the other channels, this one won't need
+        // to be reset on each frame since it's a separate matrix.
+        octave_idx_type a_idx = 0;
+        for (octave_idx_type frame = 0; frame < nFrames; frame++)
+          {
+            const Magick::PixelPacket *pix
+              = imvec[frameidx(frame)].getConstPixels (col_start, row_start,
+                                                       col_cache, row_cache);
+            // Note that for CMYKColorspace + matte (CMYKA), the opacity is
+            // stored in the assocated IndexPacket.
+            const Magick::IndexPacket *apix
+              = imvec[frameidx(frame)].getConstIndexes ();
 
-            // Next frame.
-            vec += rows * columns * idim(2);
+            octave_idx_type idx = 0;
+            img_fvec += nRows * nCols * frame;
+            P *cbuf   = img_fvec;
+            P *mbuf   = img_fvec + nRows * nCols;
+            P *ybuf   = img_fvec + nRows * nCols * 2;
+            P *kbuf   = img_fvec + nRows * nCols * 3;
+
+            for (octave_idx_type col = 0; col < nCols; col++)
+              {
+                for (octave_idx_type row = 0; row < nRows; row++)
+                  {
+                    cbuf[idx]     = pix->red     / divisor;
+                    mbuf[idx]     = pix->green   / divisor;
+                    ybuf[idx]     = pix->blue    / divisor;
+                    kbuf[idx]     = pix->opacity / divisor;
+                    a_fvec[a_idx] = *apix / divisor;
+                    pix += row_shift;
+                    idx++;
+                    a_idx++;
+                  }
+                pix -= col_shift;
+              }
           }
-        }
-      break;
+        retval(2) = alpha;
+        break;
+      }
 
     default:
-      error ("__magick_read__: undefined Magick++ image type");
+      error ("__magick_read__: unknown Magick++ image type");
       return retval;
     }
 
-  retval(0) = im;
-
+  retval(0) = img;
   return retval;
 }
 
+
 void static
 read_file (const std::string filename, std::vector<Magick::Image>& imvec)
 {
@@ -396,7 +579,7 @@
       return output;
     }
 
-  const octave_map options = args(1).map_value ();
+  const octave_scalar_map options = args(1).scalar_map_value ();
   if (error_state)
     {
       error ("__magick_read__: OPTIONS must be a struct");
@@ -412,7 +595,7 @@
   // Prepare an Array with the indexes for the requested frames.
   const octave_idx_type nFrames = imvec.size ();
   Array<octave_idx_type> frameidx;
-  const octave_value indexes = options.getfield ("index")(0);
+  const octave_value indexes = options.getfield ("index");
   if (indexes.is_string () && indexes.string_value () == "all")
     {
       frameidx.resize (dim_vector (1, nFrames));
@@ -443,19 +626,38 @@
     }
 
   const Magick::ClassType klass = imvec[0].classType ();
+  const octave_idx_type depth   = imvec[0].depth ();
 
+  // Magick::ClassType
   // PseudoClass:
   // Image is composed of pixels which specify an index in a color palette.
-  if (klass == Magick::PseudoClass)
+  // DirectClass:
+  // Image is composed of pixels which represent literal color values.
+
+  // FIXME: GraphicsMagick does not really distinguishes between indexed and
+  //        normal images. After reading a file, it decides itself the optimal
+  //        way to store the image in memory, independently of the how the
+  //        image was stored in the file. That's what ClassType returns. While
+  //        it seems to match the original file most of the times, this is
+  //        not necessarily true all the times. See
+  //          https://sourceforge.net/mailarchive/message.php?msg_id=31180507
+  //        A grayscale jpeg image reports being indexed even though the JPEG
+  //        format has no support for indexed images. So we can skip at least
+  //        for that.
+
+  if (klass == Magick::PseudoClass && imvec[0].magick () != "JPEG")
     {
-      const octave_idx_type mapsize = imvec[0].colorMapSize ();
-      if (mapsize <= 256)
+      if (depth <= 1)
         {
-          output = read_indexed_images <uint8NDArray> (imvec, frameidx, nargout);
+          output = read_indexed_images <boolNDArray> (imvec, frameidx, nargout, options);
         }
-      else if (mapsize <= 65536)
+      else if (depth <= 8)
         {
-          output = read_indexed_images <uint16NDArray> (imvec, frameidx, nargout);
+          output = read_indexed_images <uint8NDArray> (imvec, frameidx, nargout, options);
+        }
+      else if (depth <= 16)
+        {
+          output = read_indexed_images <uint16NDArray> (imvec, frameidx, nargout, options);
         }
       else
         {
@@ -463,45 +665,30 @@
           return output;
         }
     }
-  // DirectClass:
-  // Image is composed of pixels which represent literal color values.
-  else if (klass == Magick::DirectClass)
-    {
-      unsigned int depth = imvec[0].modulusDepth ();
-      if (depth > 1)
-        {
-          --depth;
-          int i = 1;
-          while (depth >>= 1)
-            i++;
-          depth = 1 << i;
-        }
 
-      switch (depth)
-        {
-        case 1:
-          output = read_images<boolNDArray> (imvec, frameidx, depth);
-          break;
-
-        case 2:
-        case 4:
-        case 8:
-          output = read_images<uint8NDArray> (imvec, frameidx, depth) ;
-          break;
-
-        case 16:
-          output = read_images<uint16NDArray> (imvec, frameidx, depth);
-          break;
-
-        case 32:
-        case 64:
-        default:
-          error ("__magick_read__: image depths greater than 16-bit are not supported");
-        }
-    }
   else
     {
-      error ("imread: unsupported image class type");
+      if (depth <= 1)
+        {
+          output = read_images<boolNDArray> (imvec, frameidx, nargout, options);
+        }
+      else if (depth <= 8)
+        {
+          output = read_images<uint8NDArray> (imvec, frameidx, nargout, options);
+        }
+      else if (depth <= 16)
+        {
+          output = read_images<uint16NDArray> (imvec, frameidx, nargout, options);
+        }
+      else if (depth <= 32)
+        {
+          output = read_images<FloatNDArray> (imvec, frameidx, nargout, options);
+        }
+      else
+        {
+          error ("imread: reading of images with %i-bit depth is not supported",
+                 depth);
+        }
     }
 
 #endif
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -300,6 +300,49 @@
   fi
 ])
 dnl
+dnl Check whether the Qt QAbstractItemModel::beginResetModel() function exists.
+dnl Also checks for QAbstractItemModel::endResetModel().  These are two of the
+dnl newest Qt functions that the Octave GUI depends on, added in Qt 4.6.
+dnl
+AC_DEFUN([OCTAVE_CHECK_FUNC_QABSTRACTITEMMODEL_BEGINRESETMODEL], [
+  AC_CACHE_CHECK([whether Qt has the QAbstractItemModel::beginResetModel() function],
+    [octave_cv_func_qabstractitemmodel_beginresetmodel],
+    [AC_LANG_PUSH(C++)
+    ac_octave_save_CPPFLAGS="$CPPFLAGS"
+    CPPFLAGS="$QT_CPPFLAGS $CPPFLAGS"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+        #include <QAbstractItemModel>
+        class item_model : public QAbstractItemModel
+        {
+        public:
+          item_model (QObject *parent = 0) : QAbstractItemModel (parent) {}
+          ~item_model () {}
+          QModelIndex index (int, int, const QModelIndex& m) const { return m; }
+          QModelIndex parent (const QModelIndex& m) const { return m; }
+          int columnCount (const QModelIndex&) const { return 0; }
+          int rowCount (const QModelIndex&) const { return 0; }
+          QVariant data (const QModelIndex&, int) const { return QVariant(); }
+          void update_model ()
+          {
+            this->beginResetModel ();
+            this->endResetModel ();
+          }
+        };
+        ]], [[
+        item_model model;
+        model.update_model ();
+        ]])],
+      octave_cv_func_qabstractitemmodel_beginresetmodel=yes,
+      octave_cv_func_qabstractitemmodel_beginresetmodel=no)
+    CPPFLAGS="$ac_octave_save_CPPFLAGS"
+    AC_LANG_POP(C++)
+  ])
+  if test $octave_cv_func_qabstractitemmodel_beginresetmodel = yes; then
+    AC_DEFINE(HAVE_QABSTRACTITEMMODEL_BEGINRESETMODEL, 1,
+      [Define to 1 if Qt has the QAbstractItemModel::beginResetModel() function.])
+  fi
+])
+dnl
 dnl Check whether HDF5 library has version 1.6 API functions.
 dnl
 AC_DEFUN([OCTAVE_CHECK_HDF5_HAS_VER_16_API], [
--- a/scripts/general/accumarray.m
+++ b/scripts/general/accumarray.m
@@ -61,7 +61,7 @@
 ## that in the first column counts how many occurrences each number in
 ## the second column has, taken from the vector @var{x}.  Note the usage
 ## of @code{unique}  for assigning to all repeated elements of @var{x}
-## the same index (@pxref{docXunique}).
+## the same index (@pxref{XREFunique,,unique}).
 ##
 ## @example
 ## @group
@@ -92,7 +92,7 @@
 ## @end example
 ##
 ## The sparse option can be used as an alternative to the @code{sparse}
-## constructor (@pxref{docXsparse}).  Thus
+## constructor (@pxref{XREFsparse,,sparse}).  Thus
 ##
 ## @example
 ## sparse (@var{i}, @var{j}, @var{sv})
--- a/scripts/general/structfun.m
+++ b/scripts/general/structfun.m
@@ -68,7 +68,7 @@
 ## elements "identifier", "message" and "index", giving respectively the error
 ## identifier, the error message, and the index into the input arguments
 ## of the element that caused the error.  For an example on how to use
-## an error handler, @pxref{docXcellfun, @code{cellfun}}.
+## an error handler, @pxref{XREFcellfun,,cellfun}.
 ##
 ## @seealso{cellfun, arrayfun, spfun}
 ## @end deftypefn
--- a/scripts/geometry/delaunay.m
+++ b/scripts/geometry/delaunay.m
@@ -75,7 +75,7 @@
   switch (nargin)
 
   case 1
-    if (! ismatrix (varargin{1}) && columns (varargin{1}) != 2)
+    if (! ismatrix (varargin{1}) || columns (varargin{1}) != 2)
         error ("delaunay: X must be a matrix with 2 columns");
     else
       x = varargin{1}(:,1);
@@ -109,7 +109,7 @@
 
   endswitch
 
-  if (! (isvector (x) && isvector (y) && length (x) == length (y)))
+  if (! (isequal(size(x),size(y))))
     error ("delaunay: X and Y must be the same size");
   endif
 
@@ -156,5 +156,13 @@
 %! y = [0, 1, 0, -1, 0];
 %! assert (sortrows (sort (delaunay (x, y), 2)), [1,2,5;1,4,5;2,3,5;3,4,5]);
 
+%!testif HAVE_QHULL
+%! x = [-1, 0; 0, 1; 1, 0; 0, -1; 0, 0];
+%! assert (sortrows (sort (delaunay (x), 2)), [1,2,5;1,4,5;2,3,5;3,4,5]);
+
+%!testif HAVE_QHULL
+%! x = [1 5 2; 5 6 7];
+%! y = [5 7 8; 1 2 3];
+%! assert (sortrows (sort (delaunay (x, y), 2)), [1,2,4;1,3,4;1,3,5;3,4,6]);
+
 %% FIXME: Need input validation tests
-
--- a/scripts/geometry/voronoi.m
+++ b/scripts/geometry/voronoi.m
@@ -74,13 +74,13 @@
 
   narg = 1;
   if (isscalar (varargin{1}) && ishandle (varargin{1}))
-    handl = varargin{1};
-    if (! strcmp (get (handl, "type"), "axes"))
-      error ("voronoi: expecting first argument to be an axes object");
+    hax = varargin{1};
+    if (! isaxes (harg))
+      error ("imagesc: HAX argument must be an axes object");
     endif
     narg++;
   elseif (nargout < 2)
-    handl = gca ();
+    hax = gca ();
   endif
 
   if (nargin < 1 + narg || nargin > 3 + narg)
@@ -154,7 +154,7 @@
   Vvy = reshape (p(edges, 2), size (edges));
 
   if (nargout < 2)
-    h = plot (handl, Vvx, Vvy, linespec{:}, x, y, '+');
+    h = plot (hax, Vvx, Vvy, linespec{:}, x, y, '+');
     lim = [xmin, xmax, ymin, ymax];
     axis (lim + 0.1 * [[-1, 1] * xdelta, [-1, 1] * ydelta]);
     if (nargout == 1)
--- a/scripts/help/print_usage.m
+++ b/scripts/help/print_usage.m
@@ -31,22 +31,22 @@
   if (nargin == 0)
     ## Determine the name of the calling function
     if (numel (x) > 1)
-      name = x (2).name;
+      name = x(2).name;
     else
       error ("Octave:invalid-context", "print_usage: invalid function\n");
     endif
-    fullpath = evalin ("caller", "mfilename (""fullpath"")");
+    fullpath = evalin ("caller", 'mfilename ("fullpath")');
     if (strcmp (fullpath(end-length(name)+1:end), name))
-      fullname = [fullpath, ".m"];
+      fullname = [fullpath ".m"];
     endif
-  elseif (!ischar (name))
+  elseif (! ischar (name))
     error ("Octave:invalid-input-arg",
-                                "print_usage: input argument must be a string");
+           "print_usage: input argument must be a string");
   else
     fullname = name;
   endif
 
-  ## Determine if we're called from top level.
+  ## Determine if we were called from top level.
   at_toplev = length (x) < 2 || (length (x) == 2 && strcmp (x(2).name, name));
 
   ## Do the actual work
@@ -74,7 +74,8 @@
   endif
 
   if (at_toplev)
-    error ("Octave:invalid-fun-call", "Invalid call to %s.  Correct usage is:\n\n%s\n%s",
+    error ("Octave:invalid-fun-call",
+           "Invalid call to %s.  Correct usage is:\n\n%s\n%s",
            name, usage_string, __additional_help_message__ ());
   else
     msg = sprintf ("Invalid call to %s.  Correct usage is:\n\n%s",
@@ -102,25 +103,23 @@
   ## concatenated with the following line.
   help_text = strrep (help_text, "@\n", " ");
 
-  ## Find, and keep, lines that start with @def or @end def. This should include things
-  ## such as @deftypefn, @deftypefnx, @defvar, etc. and their corresponding @end's
+  ## Find, and keep, lines that start with @def or @end def. This should
+  ## include things such as @deftypefn, @deftypefnx, @defvar, etc. and their
+  ## corresponding @end's.
   def_idx = strfind (help_text, "@def");
-  if (!isempty (def_idx))
-    buffer = "";
+  if (! isempty (def_idx))
+    endf_idx = strfind (help_text, "@end def");
+    def_idx = sort ([def_idx, endf_idx]);
     endl_idx = find (help_text == "\n");
+    buffer = "";
     for k = 1:length (def_idx)
-      endl = endl_idx (find (endl_idx > def_idx (k), 1));
+      endl = endl_idx (find (endl_idx > def_idx(k), 1));
       if (isempty (endl))
-        buffer = strcat (buffer, help_text (def_idx (k):end), "\n");
+        buffer = strcat (buffer, help_text (def_idx(k):end), "\n");
       else
-        buffer = strcat (buffer, help_text (def_idx (k):endl));
+        buffer = strcat (buffer, help_text (def_idx(k):endl));
       endif
     endfor
-
-    end_def_idx = strfind (help_text, "@end def");
-    if (!isempty (end_def_idx))
-      buffer = strcat (buffer, help_text (end_def_idx:end));
-    endif
   else
     [retval, status] = get_usage_plain_text (help_text, max_len);
   endif
--- a/scripts/image/imagesc.m
+++ b/scripts/image/imagesc.m
@@ -20,7 +20,7 @@
 ## @deftypefn  {Function File} {} imagesc (@var{img})
 ## @deftypefnx {Function File} {} imagesc (@var{x}, @var{y}, @var{img})
 ## @deftypefnx {Function File} {} imagesc (@dots{}, @var{climits})
-## @deftypefnx {Function File} {} imagesc (@var{h}, @dots{})
+## @deftypefnx {Function File} {} imagesc (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} imagesc (@dots{})
 ## Display a scaled version of the matrix @var{img} as a color image.  The
 ## colormap is scaled so that the entries of the matrix occupy the entire
@@ -45,14 +45,14 @@
   if (nargin < 1 || nargin > 4)
     print_usage ();
   elseif (isscalar (varargin{1}) && ishandle (varargin{1}))
-    harg = varargin{1};
-    if (! strcmp (get (harg, "type"), "axes"))
-      error ("imagesc: expecting first argument to be an axes object");
+    hax = varargin{1};
+    if (! isaxes (hax))
+      error ("imagesc: HAX argument must be an axes object");
     endif
     oldh = gca ();
     unwind_protect
       axes (h);
-      htmp = __imagesc__ (harg, varargin{2:end});
+      htmp = __imagesc__ (hax, varargin{2:end});
     unwind_protect_cleanup
       axes (oldh);
     end_unwind_protect
--- a/scripts/image/imread.m
+++ b/scripts/image/imread.m
@@ -65,6 +65,12 @@
 ## This option exists for @sc{Matlab} compatibility and has no effect.  For
 ## maximum performance while reading multiple images from a single file,
 ## use the Index option.
+##
+## @item "PixelRegion"
+## Controls the image region that is read.  Takes as value a cell array
+## with two arrays of 3 elements @code{@{@var{rows} @var{cols}@}}.  The
+## elements in the array are the start, increment and end pixel to be
+## read.  If the increment value is ommited, defaults to 1.
 ## @end table
 ##
 ## @seealso{imwrite, imfinfo, imformats}
--- a/scripts/image/private/__imread__.m
+++ b/scripts/image/private/__imread__.m
@@ -56,8 +56,10 @@
     error ("imread: cannot find %s", filename);
   endif
 
+  info = imfinfo (fn)(1);
   ## set default for options
-  options = struct ("index", 1);
+  options = struct ("index",       1,
+                    "region", {{1:1:info.Height 1:1:info.Width}});
 
   ## Index is the only option that can be defined without the parameter/value
   ## pair style. When defining it here, the string "all" is invalid though.
@@ -84,27 +86,31 @@
           error ("imread: value for %s must be a vector or the string `all'");
         endif
 
-## FIXME: commented until it's implemented in __magick_read__
-##      case "pixelregion",
-##        options.region = varargin{idx+1};
-##        if (! iscell (options.region) || numel (options.region) != 2)
-##          error ("imread: value for %s must be a 2 element cell array",
-##                 varargin{idx});
-##        endif
-##        for reg_idx = 1:2
-##          if (numel (options.region{reg_idx}) == 3)
-##            ## do nothing
-##          elseif (numel (options.region{reg_idx}) == 2)
-##            options.region{reg_idx}(3) = options.region{reg_idx}(2);
-##            options.region{reg_idx}(2) = 1;
-##          else
-##            error ("imread: range for %s must be a 2 or 3 element vector",
-##                   varargin{idx});
-##          endif
-##          options.region{reg_idx} = floor (options.region{reg_idx}(1)): ...
-##                                    floor (options.region{reg_idx}(2)): ...
-##                                    floor (options.region{reg_idx}(3));
-##        endfor
+      case "pixelregion",
+        options.region = varargin{idx+1};
+        if (! iscell (options.region) || numel (options.region) != 2)
+          error ("imread: value for %s must be a 2 element cell array",
+                 varargin{idx});
+        endif
+        for reg_idx = 1:2
+          if (numel (options.region{reg_idx}) == 3)
+            ## do nothing
+          elseif (numel (options.region{reg_idx}) == 2)
+            options.region{reg_idx}(3) = options.region{reg_idx}(2);
+            options.region{reg_idx}(2) = 1;
+          else
+            error ("imread: range for %s must be a 2 or 3 element vector",
+                   varargin{idx});
+          endif
+          options.region{reg_idx} = floor (options.region{reg_idx}(1)): ...
+                                    floor (options.region{reg_idx}(2)): ...
+                                    floor (options.region{reg_idx}(3));
+        endfor
+        if (options.region{1}(end) > info.Height)
+          error ("imread: end ROWS for PixelRegions option is larger than image height");
+        elseif (options.region{2}(end) > info.Width)
+          error ("imread: end COLS for PixelRegions option is larger than image width");
+        endif
 
       case "info",
         ## We ignore this option. This parameter exists in Matlab to
--- a/scripts/miscellaneous/edit.m
+++ b/scripts/miscellaneous/edit.m
@@ -134,7 +134,7 @@
 ## This value determines whether the editor should be started in async mode
 ## (editor is started in the background and Octave continues) or sync mode
 ## (Octave waits until the editor exits).  Set it to "sync" to start the editor
-## in sync mode.  The default is "async" (@pxref{docXsystem,,system}).
+## in sync mode.  The default is "async" (@pxref{XREFsystem,,system}).
 ##
 ## @item editinplace
 ## Determines whether files should be edited in place, without regard to
--- a/scripts/miscellaneous/fact.m
+++ b/scripts/miscellaneous/fact.m
@@ -90,7 +90,7 @@
        "Richard Stallman doesn’t code; he dares the computer to not do his bidding.";
        "Global warming is caused by Richard Stallman's rage towards non-free software.";
        "Rather than being birthed like a normal child, Richard Stallman instead instantiated himself polymorphically. Shortly thereafter he grew a beard.";
-       "Richard Stallman discovered extra-terrestrial life but killed them because they used non-free software.";
+       "Richard Stallman discovered extra-terrestrial life but killed them because they distributed non-free software.";
        "Richard Stallman doesn't evaluate expressions; expressions evaluate to Richard Stallman.";
        "Richard Stallman can see Russia from his house.";
        "Richard Stallman proved P=NP, twice!";
@@ -237,6 +237,24 @@
        "Richard Stallman exists because he compiled himself into being.";
        "Richard Stallman's first words were in binary. When they couldn't understand him, he wrote a parser.";
        "Richard Stallman doesn't need any codecs, he just opens a multimedia file with Emacs, and reads the bytes of the file as plain text. He then performs all the necessary decoding in his mind. But he refuses to decode files encrypted with DRM, although his mind is able to.";
+       "Richard Stallman was right. Sadly.";
+       "Richard Stallman can wiretap the NSA.";
+       "This is how Richard Stallman created Emacs: http://stallman.org/photos/rms-working/img_0631.jpg";
+       "Join Richard Stallman now and share the software, you'll be a free hacker, you'll be free!";
+       "Richard Stallman has not agreed to the terms and conditions and privacy policy because only he can actually read all of it.";
+       "Richard Stallman knows how of a backdoor to AES, but he respects your freedom and privacy too much to actually use it.";
+       "Richard Stallman will never get tired of being mocked for the foot cheese incident.";
+       "You like to release non-free software around Richard Stallman? I too like to live dangerously...";
+       "Yeah, if could just go ahead and make all software free for Richard Stallman, that'd be great, thanks.";
+       "Richard Stallman knows exactly what you mean when you talk about the cloud. But do you?";
+       "Richard Stallman satisfies Greenspun's Tenth Rule of programming, since his DNA also contains a complete implementation of all of Common Lisp.";
+       "Richard Stallman can violate the GPL. In a vulgar display of power, he once did so with the Emacs source code, but he undid the violation before most people noticed.";
+       "Good guy Richard Stallman does not try to shake you down for money. He will just kindly ask you to comply with the GPL.";
+       "Richard Stallman is in fact also a little sad that Steve Jobs is gone because it has diminished the size of the loyal opposition.";
+       "Richard Stallman can release LLVM and clang under the GPL.";
+       "No, really, Richard Stallman has a katana.";
+       "Every day Richard Stallman finds at least fifteen things in the world to rage about. You can read his findings here: http://stallman.org/archives/polnotes.html"
+       "Some of these Richard Stallman facts are completely true. Seriously.";
        };
 
   w = wisdom{randi([1, numel(wisdom)])};
--- a/scripts/miscellaneous/getappdata.m
+++ b/scripts/miscellaneous/getappdata.m
@@ -23,6 +23,8 @@
 ## 
 ## @code{getappdata(@var{h})} returns a structure, @var{appdata}, whose fields
 ## correspond to the appdata properties.
+##
+## @seealso{setappdata, guidata, get, set, getpref, setpref}
 ## @end deftypefn
 
 ## Author: Ben Abbott <bpabbott@mac.com>
--- a/scripts/miscellaneous/setappdata.m
+++ b/scripts/miscellaneous/setappdata.m
@@ -19,6 +19,7 @@
 ## Set the named application data to @var{value} for the object(s) with
 ## handle(s) @var{h}.  If the application data with the specified name does
 ## not exist, it is created.
+## @seealso{getappdata, guidata, get, set, getpref, setpref}
 ## @end deftypefn
 
 ## Author: Ben Abbott <bpabbott@mac.com>
--- a/scripts/miscellaneous/setfield.m
+++ b/scripts/miscellaneous/setfield.m
@@ -43,7 +43,7 @@
 ## used here, as the field name is not a valid Octave identifier.  Using
 ## arbitrary strings for field name is incompatible with @sc{matlab}, so
 ## this usage will warn if the @code{Octave:matlab-incompatible} warning
-## is set.  @xref{docXwarning_ids}.
+## is set.  @xref{XREFwarning_ids}.
 ##
 ## With the second calling form, set a field on a structure array,
 ## possibly nested, with successive nested indices @var{idx1},
--- a/scripts/miscellaneous/warning_ids.m
+++ b/scripts/miscellaneous/warning_ids.m
@@ -177,7 +177,7 @@
 ## compatibility problems with @sc{matlab}.
 ## By default, the @code{Octave:matlab-incompatible} warning is disabled.
 ## The --traditional or --braindead startup options for Octave may also
-## be of use, @xref{Command Line Options}.
+## be of use, @pxref{Command Line Options}.
 ##
 ## @item Octave:md5sum-file-in-path
 ## By default, the @code{Octave:md5sum-file-in-path} warning is enabled.
--- a/scripts/optimization/fminbnd.m
+++ b/scripts/optimization/fminbnd.m
@@ -26,7 +26,7 @@
 ## starting interval.  @var{options} is a structure specifying additional
 ## options.  Currently, @code{fminbnd} recognizes these options:
 ## "FunValCheck", "OutputFcn", "TolX", "MaxIter", "MaxFunEvals".  For a
-## description of these options, see @ref{docXoptimset,,optimset}.
+## description of these options, see @ref{XREFoptimset,,optimset}.
 ##
 ## On exit, the function returns @var{x}, the approximate minimum point
 ## and @var{fval}, the function value thereof.
--- a/scripts/optimization/fzero.m
+++ b/scripts/optimization/fzero.m
@@ -42,7 +42,7 @@
 ## Currently, @code{fzero}
 ## recognizes these options: @code{"FunValCheck"}, @code{"OutputFcn"},
 ## @code{"TolX"}, @code{"MaxIter"}, @code{"MaxFunEvals"}.
-## For a description of these options, see @ref{docXoptimset,,optimset}.
+## For a description of these options, see @ref{XREFoptimset,,optimset}.
 ##
 ## On exit, the function returns @var{x}, the approximate zero point
 ## and @var{fval}, the function value thereof.
--- a/scripts/optimization/lsqnonneg.m
+++ b/scripts/optimization/lsqnonneg.m
@@ -32,7 +32,7 @@
 ## optional initial guess for @var{x}.
 ## Currently, @code{lsqnonneg}
 ## recognizes these options: @code{"MaxIter"}, @code{"TolX"}.
-## For a description of these options, see @ref{docXoptimset,,optimset}.
+## For a description of these options, see @ref{XREFoptimset,,optimset}.
 ##
 ## Outputs:
 ##
--- a/scripts/plot/__plt_get_axis_arg__.m
+++ b/scripts/plot/__plt_get_axis_arg__.m
@@ -28,24 +28,24 @@
   h = [];
   parent = find (strcmpi (varargin, "parent"), 1);
   
-  ## Look for numeric scalar which is a graphics handle but not the
+
+  ## Look for a scalar which is a graphics handle but not the
   ## Root Figure (0) or an ordinary figure (integer).
-  if (numel (varargin) > 0 && isnumeric (varargin{1})
-      && isscalar (varargin{1}) && ishandle (varargin{1})
-      && varargin{1} != 0 && ! isfigure (varargin{1}))
+  if (numel (varargin) > 0 && numel (varargin{1}) == 1
+      && ishandle (varargin{1}) && varargin{1} != 0 && ! isfigure (varargin{1}))
     htmp = varargin{1};
-    obj = get (htmp);
-    if (strcmp (obj.type, "axes") && ! strcmp (obj.tag, "legend"))
+    if (! isaxes (htmp))
+      error ("%s: expecting first argument to be axes handle", caller);
+    endif
+    if (! strcmp (get (htmp, "tag"), "legend"))
       h = htmp;
       varargin(1) = [];
-    else
-      error ("%s: expecting first argument to be axes handle", caller);
     endif
+  ## Look for "parent"/axis prop/value pair
   elseif (numel (varargin) > 1 && ! isempty (parent))
     if (parent < numel (varargin) && ishandle (varargin{parent+1}))
       htmp = varargin{parent+1};
-      obj = get (htmp);
-      if (strcmp (obj.type, "axes") && ! strcmp (obj.tag, "legend"))
+      if (isaxes (htmp) && ! strcmp (get (htmp, "tag"), "legend"))
         h = htmp;
         varargin(parent:parent+1) = [];
       else
--- a/scripts/plot/allchild.m
+++ b/scripts/plot/allchild.m
@@ -20,18 +20,21 @@
 ## @deftypefn {Function File} {@var{h} =} allchild (@var{handles})
 ## Find all children, including hidden children, of a graphics object.
 ##
-## This function is similar to @code{get (h, "children")}, but also
-## returns hidden objects.  If @var{handles} is a scalar,
-## @var{h} will be a vector.  Otherwise, @var{h} will be a cell matrix
-## of the same size as @var{handles} and each cell will contain a
-## vector of handles.
-## @seealso{get, set, findall, findobj}
+## This function is similar to @code{get (h, "children")}, but also returns
+## hidden objects ("HandleVisibility" = "off").  If @var{handles} is a scalar,
+## @var{h} will be a vector.  Otherwise, @var{h} will be a cell matrix of the
+## same size as @var{handles} and each cell will contain a vector of handles.
+## @seealso{findall, findobj, get, set}
 ## @end deftypefn
 
 ## Author: Bill Denney <bill@denney.ws>
 
 function h = allchild (handles)
 
+  if (nargin != 1)
+    print_usage ();
+  endif
+
   shh = get (0, "showhiddenhandles");
   unwind_protect
     set (0, "showhiddenhandles", "on");
@@ -44,14 +47,17 @@
 
 
 %!testif HAVE_FLTK
-%! toolkit = graphics_toolkit ();
-%! graphics_toolkit ("fltk");
+%! toolkit = graphics_toolkit ("fltk");
 %! hf = figure ("visible", "off");
 %! unwind_protect
 %!   l = line;
-%!   assert (get (allchild (hf),"type"),{"axes"; "uimenu"; "uimenu"; "uimenu"});
+%!   kids = allchild (hf);
+%!   assert (get (kids, "type"), {"axes"; "uimenu"; "uimenu"; "uimenu"});
 %! unwind_protect_cleanup
 %!   close (hf);
 %!   graphics_toolkit (toolkit);
 %! end_unwind_protect
 
+%!error allchild ()
+%!error allchild (1, 2)
+
--- a/scripts/plot/ancestor.m
+++ b/scripts/plot/ancestor.m
@@ -24,7 +24,7 @@
 ## cell array of strings, return the first parent whose type matches
 ## any of the given type strings.
 ##
-## If the handle object @var{h} is of type @var{type}, return @var{h}.
+## If the handle object @var{h} itself is of type @var{type}, return @var{h}.
 ##
 ## If @code{"toplevel"} is given as a third argument, return the highest
 ## parent in the object hierarchy that matches the condition, instead
--- a/scripts/plot/area.m
+++ b/scripts/plot/area.m
@@ -24,24 +24,24 @@
 ## @deftypefnx {Function File} {} area (@dots{}, @var{prop}, @var{val}, @dots{})
 ## @deftypefnx {Function File} {} area (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} area (@dots{})
-## Area plot of the columns of @var{y}.  This shows the
-## contributions of each column value to the row sum.  It is functionally
-## similar to @code{plot (@var{x}, cumsum (@var{y}, 2))}, except that the
-## area under the curve is shaded.
+## Area plot of the columns of @var{y}.
+##
+## This plot shows the contributions of each column value to the row sum.  It
+## is functionally similar to @code{plot (@var{x}, cumsum (@var{y}, 2))},
+## except that the area under the curve is shaded.
 ##
-## If the @var{x} argument is omitted it defaults to 
-## @code{1 : rows (@var{y})}.  A value @var{lvl} can be defined that determines
-## where the base level of the shading under the curve should be defined.  The
-## default level is 0.
+## If the @var{x} argument is omitted it defaults to @code{1:rows (@var{y})}.
+## A value @var{lvl} can be defined that determines where the base level of
+## the shading under the curve should be defined.  The default level is 0.
 ##
-## Additional arguments to the @code{area} function are passed directly to
-## @code{patch}.  
+## Additional property/value pairs are passed directly to the underlying patch
+## object.
 ##
-## If the first argument is an axis handle @var{hax}, then plot into these axes,
-## rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the hggroup
-## object representing the area patch objects.  The "BaseValue" property
+## object comprising the area patch objects.  The "BaseValue" property
 ## of the hggroup can be used to adjust the level where shading begins.
 ##
 ## Example: Verify identity sin^2 + cos^2 = 1
@@ -51,7 +51,7 @@
 ## t = linspace (0, 2*pi, 100)';
 ## y = [sin(t).^2, cos(t).^2)];
 ## area (t, y);
-## legend ('sin^2', 'cos^2', 'location', 'NorthEastOutside');  
+## legend ("sin^2", "cos^2", "location", "NorthEastOutside");  
 ## @end group
 ## @end example
 ## @seealso{plot, patch}
--- a/scripts/plot/axes.m
+++ b/scripts/plot/axes.m
@@ -19,19 +19,19 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} axes ()
 ## @deftypefnx {Function File} {} axes (@var{property}, @var{value}, @dots{})
-## @deftypefnx {Function File} {} axes (@var{h})
+## @deftypefnx {Function File} {} axes (@var{hax})
 ## @deftypefnx {Function File} {@var{h} =} axes (@dots{})
 ## Create an axes object and return a handle to it, or set the current
-## axes to @var{h}.
+## axes to @var{hax}.
 ##
 ## Called without any arguments, or with @var{property}/@var{value} pairs,
-## contruct a new axes.  For accepted properties and corresponding
-## values, see @code{set} function.
+## construct a new axes.  For accepted properties and corresponding
+## values, @pxref{XREFset,,set}.
 ##
-## Called with a single axes handle argument @var{h}, the function makes
-## @var{h} the current axis.  It also restacks the axes in the
-## corresponding figure so that @var{h} is the first entry in the list
-## of children.  This causes @var{h} to be displayed on top of any other
+## Called with a single axes handle argument @var{hax}, the function makes
+## @var{hax} the current axis.  It also restacks the axes in the
+## corresponding figure so that @var{hax} is the first entry in the list
+## of children.  This causes @var{hax} to be displayed on top of any other
 ## axes objects (Z-order stacking).
 ## 
 ## @seealso {gca, set, get}
@@ -57,8 +57,7 @@
   else
     ## ARG is axes handle.
     htmp = varargin{1};
-    if (isscalar (htmp) && ishandle (htmp)
-        && strcmp (get (htmp, "type"), "axes"))
+    if (isscalar (htmp) && isaxes (htmp))
       if (__is_handle_visible__ (htmp))
         parent = ancestor (htmp, "figure");
         set (0, "currentfigure", parent);
--- a/scripts/plot/axis.m
+++ b/scripts/plot/axis.m
@@ -23,9 +23,9 @@
 ## @deftypefnx {Function File} {} axis ([@var{x}_lo @var{x}_hi @var{y}_lo @var{y}_hi @var{z}_lo @var{z}_hi])
 ## @deftypefnx {Function File} {} axis (@var{option})
 ## @deftypefnx {Function File} {} axis (@dots{}, @var{option})
-## @deftypefnx {Function File} {} axis (@var{h}, @dots{})
+## @deftypefnx {Function File} {} axis (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{limits} =} axis ()
-## Set axis limits for plots.
+## Set axis limits and appearance.
 ##
 ## The argument @var{limits} should be a 2-, 4-, or 6-element vector.  The
 ## first and second elements specify the lower and upper limits for the
@@ -34,7 +34,8 @@
 ##
 ## Without any arguments, @code{axis} turns autoscaling on.
 ##
-## With one output argument, @code{x = axis} returns the current axes.
+## With one output argument, @code{@var{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.  For
@@ -66,7 +67,7 @@
 ## Force x distance to equal y-distance.
 ##
 ## @item "normal"
-## Restore the balance.
+## Restore default aspect ratio.
 ## @end table
 ##
 ## @noindent
@@ -82,13 +83,12 @@
 ##
 ## @item "tight"
 ## Fix axes to the limits of the data.
+##
+## @item "image"
+## Equivalent to "tight" and "equal".
 ## @end table
 ##
 ## @noindent
-## The option @code{"image"} is equivalent to @code{"tight"} and
-## @code{"equal"}.
-##
-## @noindent
 ## The following options affect the appearance of tic marks.
 ##
 ## @table @asis
@@ -113,8 +113,7 @@
 ## Note, if there are no tic marks for an axis, there can be no labels.
 ##
 ## @noindent
-## The following options affect the direction of increasing values on
-## the axes.
+## The following options affect the direction of increasing values on the axes.
 ##
 ## @table @asis
 ## @item "ij"
@@ -124,8 +123,10 @@
 ## Restore y-axis, so higher values are nearer the top.
 ## @end table
 ##
-## If an axes handle is passed as the first argument, then operate on
-## this axes rather than the current axes.
+## If the first argument @var{hax} is an axes handle, then operate on
+## this axes rather than the current axes returned by @code{gca}.
+##
+## @seealso{xlim, ylim, zlim, daspect, pbaspect, box, grid}
 ## @end deftypefn
 
 ## Author: jwe
--- a/scripts/plot/bar.m
+++ b/scripts/plot/bar.m
@@ -17,18 +17,21 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} bar (@var{x}, @var{y})
-## @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})
-## Produce a bar graph from two vectors of x-y data.
+## @deftypefn  {Function File} {} bar (@var{y})
+## @deftypefnx {Function File} {} bar (@var{x}, @var{y})
+## @deftypefnx {Function File} {} bar (@dots{}, @var{w})
+## @deftypefnx {Function File} {} bar (@dots{}, @var{style})
+## @deftypefnx {Function File} {} bar (@dots{}, @var{prop}, @var{val}, @dots{})
+## @deftypefnx {Function File} {} bar (@var{hax}, @dots{})
+## @deftypefnx {Function File} {@var{h} =} bar (@dots{}, @var{prop}, @var{val}, @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
-## and the x coordinates are taken to be the indices of the elements.
+## If only one argument is given, @var{y}, it is taken as a vector of Y values
+## and the X coordinates are the range @code{1:numel (@var{y})}.
 ##
-## The default width of 0.8 for the bars can be changed using @var{w}.
+## The optional input @var{w} controls the width of the bars.  A value of
+## 1.0 will cause each bar to exactly touch any adjacent bars.
+## The default width is 0.8.
 ##
 ## If @var{y} is a matrix, then each column of @var{y} is taken to be a
 ## separate bar graph plotted on the same graph.  By default the columns
@@ -36,14 +39,17 @@
 ## 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.
+## Optional property/value pairs are passed directly to the underlying patch
+## objects.
+##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
-## 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
-## be changed in a single bar series and the same properties are changed
-## in the other "bar series".  For example,
+## The optional return value @var{h} is a vector of handles to the created
+## "bar series" hggroups with one handle per column of the variable @var{y}.
+## This series makes it possible to change a common element in one bar series
+## object and have the change reflected in the other "bar series".
+## For example,
 ##
 ## @example
 ## @group
@@ -55,11 +61,11 @@
 ## @noindent
 ## changes the position on the base of all of the bar series.
 ##
-## The bar graph's appearance may be modified by specifying property/value
-## pairs.  The following example modifies the face and edge colors.
+## The following example modifies the face and edge colors using
+## property/value pairs.
 ##
 ## @example
-## bar (randn (1, 100), "facecolor", "r", "edgecolor", "b")
+## bar (randn (1, 100), "facecolor", "r", "edgecolor", "b");
 ## @end example
 ##
 ## @noindent
@@ -85,7 +91,7 @@
 ## @end group
 ## @end example
 ##
-## @seealso{barh, plot}
+## @seealso{barh, hist, pie, plot, patch}
 ## @end deftypefn
 
 ## Author: jwe
--- a/scripts/plot/barh.m
+++ b/scripts/plot/barh.m
@@ -17,19 +17,21 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} barh (@var{x}, @var{y})
-## @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} {} 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.
+## @deftypefn  {Function File} {} barh (@var{y})
+## @deftypefnx {Function File} {} barh (@var{x}, @var{y})
+## @deftypefnx {Function File} {} barh (@dots{}, @var{w})
+## @deftypefnx {Function File} {} barh (@dots{}, @var{style})
+## @deftypefnx {Function File} {} barh (@dots{}, @var{prop}, @var{val}, @dots{})
+## @deftypefnx {Function File} {} barh (@var{hax}, @dots{})
+## @deftypefnx {Function File} {@var{h} =} barh (@dots{}, @var{prop}, @var{val}, @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
-## and the x coordinates are taken to be the indices of the elements.
+## If only one argument is given, it is taken as a vector of Y values
+## and the X coordinates are the range @code{1:numel (@var{y})}.
 ##
-## The default width of 0.8 for the bars can be changed using @var{w}.
+## The optional input @var{w} controls the width of the bars.  A value of
+## 1.0 will cause each bar to exactly touch any adjacent bars.
+## The default width is 0.8.
 ##
 ## If @var{y} is a matrix, then each column of @var{y} is taken to be a
 ## separate bar graph plotted on the same graph.  By default the columns
@@ -37,16 +39,16 @@
 ## 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.
+## Optional property/value pairs are passed directly to the underlying patch
+## objects.
+##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ## 
-## Properties of the patch graphics object can be changed using
-## @var{prop}, @var{val} pairs.
-##
 ## The optional return value @var{h} is a graphics handle to the created
-## bar series object.  See @code{bar} for a description of the use of the
-## bar series.
-## @seealso{bar, plot}
+## bar series hggroup.  For a description of the use of the
+## bar series, @pxref{XREFbar,,bar}.
+## @seealso{bar, hist, pie, plot, patch}
 ## @end deftypefn
 
 ## Author: jwe
--- a/scripts/plot/box.m
+++ b/scripts/plot/box.m
@@ -17,18 +17,18 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} box on
-## @deftypefnx {Function File} {} box off
-## @deftypefnx {Function File} {} box
+## @deftypefn  {Command} {} box on
+## @deftypefnx {Command} {} box off
+## @deftypefnx {Command} {} box
 ## @deftypefnx {Function File} {} box (@var{hax}, @dots{})
-## Control the display of a border around the current axis.
+## Control display of the axis border.
 ##
-## The argument may be either @code{"on"} or @code{"off"}.  If it is
-## omitted, the current box state is toggled.
+## The argument may be either "on" or "off".  If it is omitted, the current
+## box state is toggled.
 ##
-## If the first argument is an axis handle, @var{hax}, operate on the
-## specified axis object.
-## @seealso{grid}
+## If the first argument @var{hax} is an axes handle, then operate on
+## this axis rather than the current axes returned by @code{gca}.
+## @seealso{axis, grid}
 ## @end deftypefn
 
 ## Author: jwe
--- a/scripts/plot/caxis.m
+++ b/scripts/plot/caxis.m
@@ -32,10 +32,10 @@
 ## If @var{limits} is "auto", then automatic colormap scaling is applied,
 ## whereas if @var{limits} is "manual" the colormap scaling is set to manual.
 ##
-## Called without arguments the current color axis limits are returned.
+## If the first argument @var{hax} is an axes handle, then operate on
+## this axis rather than the current axes returned by @code{gca}.
 ##
-## If an axes handle @var{hax} is passed as the first argument then operate on
-## this axes rather than the current axes.
+## Called without arguments the current color axis limits are returned.
 ## @seealso{colormap}
 ## @end deftypefn
 
--- a/scripts/plot/cla.m
+++ b/scripts/plot/cla.m
@@ -17,11 +17,13 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} cla
-## @deftypefnx {Function File} {} cla reset
+## @deftypefn  {Command} {} cla
+## @deftypefnx {Command} {} cla reset
 ## @deftypefnx {Function File} {} cla (@var{hax})
 ## @deftypefnx {Function File} {} cla (@var{hax}, "reset")
-## Clear the current axes by deleting child graphic objects with visible
+## Clear the current axes.
+##
+## @code{cla} operates by deleting child graphic objects with visible
 ## handles (HandleVisibility = "on").
 ##
 ## If the optional argument "reset" is specified, delete all child objects
@@ -29,8 +31,8 @@
 ## their defaults.  However, the following properties are not reset:
 ## Position, Units.
 ##
-## If an axes object handle @var{hax} is specified, operate on it instead of
-## the current axes.
+## If the first argument @var{hax} is an axes handle, then operate on
+## this axis rather than the current axes returned by @code{gca}.
 ## @seealso{clf}
 ## @end deftypefn
 
@@ -45,8 +47,7 @@
     hax = gca;
     do_reset = false;
   elseif (nargin == 1)
-    if (isscalar (varargin{1}) && ishandle (varargin{1})
-        && strcmp (get (varargin{1}, "type"), "axes"))
+    if (isscalar (varargin{1}) && isaxes (varargin{1}))
       hax = varargin{1};
       do_reset = false;
     elseif (ischar (varargin{1}) && strcmpi (varargin{1}, "reset"))
@@ -56,8 +57,7 @@
       print_usage ();
     endif
   else
-    if (isscalar (varargin{1}) && ishandle (varargin{1})
-        && strcmp (get (varargin{1}, "type"), "axes")
+    if (isscalar (varargin{1}) && isaxes (varargin{1})
         && ischar (varargin{2}) && strcmpi (varargin{2}, "reset"))
       hax = varargin{1};
       do_reset = true;
@@ -80,13 +80,12 @@
 %! hf = figure ("visible", "off");
 %! unwind_protect
 %!   plot (1:10);
+%!   assert (! isempty (get (gca, "children")));
 %!   cla ();
-%!   kids = get (gca, "children");
-%!   cla ();
+%!   assert (isempty (get (gca, "children")));
 %! unwind_protect_cleanup
 %!   close (hf);
 %! end_unwind_protect
-%! assert (numel (kids), 0);
 
 %!test
 %! hf = figure ("visible", "off");
--- a/scripts/plot/clabel.m
+++ b/scripts/plot/clabel.m
@@ -21,23 +21,28 @@
 ## @deftypefnx {Function File} {} clabel (@var{c}, @var{h}, @var{v})
 ## @deftypefnx {Function File} {} clabel (@var{c}, @var{h}, "manual")
 ## @deftypefnx {Function File} {} clabel (@var{c})
-## @deftypefnx {Function File} {} clabel (@var{c}, @var{h})
 ## @deftypefnx {Function File} {} clabel (@dots{}, @var{prop}, @var{val}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} clabel (@dots{})
-## Add labels to the contours of a contour plot.  The contour plot is specified
-## by the contour matrix @var{c} and optionally the contourgroup object @var{h}
-## that are returned by @code{contour}, @code{contourf} and @code{contour3}.
-## The contour labels are rotated and placed in the contour itself.
+## Add labels to the contours of a contour plot.
+##
+## The contour levels are specified by the contour matrix @var{c} which is
+## returned by @code{contour}, @code{contourc}, @code{contourf}, and
+## @code{contour3}.  Contour labels are rotated to match the local line 
+## orientation and centered on the line.  The position of labels along the
+## contour line is chosen randomly.
+##
+## If the argument @var{h} is a handle to a contour group object, then label
+## this plot rather than the one in the current axes returned by @code{gca}.
 ##
 ## By default, all contours are labeled.  However, the contours to label can be
 ## specified by the vector @var{v}.  If the "manual" argument is given then
 ## the contours to label can be selected with the mouse.
 ##
 ## Additional property/value pairs that are valid properties of text objects
-## can be given and are passed to the underlying text objects.  Additionally,
-## the property "LabelSpacing" is available allowing the spacing between labels
-## on a contour (in points) to be specified.  The default is 144 points, or 2
-## inches.
+## can be given and are passed to the underlying text objects.  Moreover,
+## the contour group property "LabelSpacing" is available which determines
+## the spacing between labels on a contour to be specified.  The default is
+## 144 points, or 2 inches.
 ##
 ## The optional return value @var{h} is a vector of graphics handles to
 ## the text objects representing each label.  
@@ -57,6 +62,7 @@
 ## @end deftypefn
 
 function retval = clabel (c, varargin)
+
   label_spacing = 2 * 72;
   have_hg = false;
   have_labelspacing = false;
--- a/scripts/plot/clf.m
+++ b/scripts/plot/clf.m
@@ -17,8 +17,8 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} clf
-## @deftypefnx {Function File} {} clf reset
+## @deftypefn  {Command} {} clf
+## @deftypefnx {Command} {} clf reset
 ## @deftypefnx {Function File} {} clf (@var{hfig})
 ## @deftypefnx {Function File} {} clf (@var{hfig}, "reset")
 ## @deftypefnx {Function File} {@var{h} =} clf (@dots{})
--- a/scripts/plot/close.m
+++ b/scripts/plot/close.m
@@ -24,12 +24,12 @@
 ## Close figure window(s).
 ##
 ## @code{close} operates by calling the function specified by the
-## @code{"closerequestfcn"} property for each figure.  By default, the function
+## "closerequestfcn" property for each figure.  By default, the function
 ## @code{closereq} is used.
 ##
 ## When called with no arguments, close the current figure.  This is equivalent
-## to @code{close (gcf)}.  If the input is a graphic handle @var{h} or vector
-## of graphics handles then close each figure in @var{h}.
+## to @code{close (gcf)}.  If the input @var{h} is a graphic handle, or vector
+## of graphics handles, then close each figure in @var{h}.
 ##
 ## If the argument "all" is given then all figures with visible handles
 ## (HandleVisibility = "on") are closed.
@@ -39,7 +39,8 @@
 ##
 ## Implementation Note: @code{close} calls a function to dispose of the figure.
 ## It is possible that the function will delay or abort removing the figure.
-## To remove a figure without calling any callback functions use @code{delete}.
+## To remove a figure without executing any callback functions use
+## @code{delete}.
 ##
 ## @seealso{closereq, delete}
 ## @end deftypefn
@@ -69,12 +70,14 @@
     elseif (isempty (arg1))
       figs = [];
     else
-      error ('close: expecting argument to be "all" or a figure handle');
+      error ('close: first argument must be "all" or a figure handle');
     endif
   elseif (   ischar (arg1) && strcmpi (arg1, "all")
           && ischar (arg2) && strcmpi (arg2, "hidden"))
     figs = (allchild (0))';
     figs = figs(isfigure (figs));
+  else
+    error ('close: expecting argument to be "all hidden"');
   endif
 
   for h = figs
@@ -93,10 +96,16 @@
 %! unwind_protect
 %!   close (hf);
 %!   objs = findobj ("type", "figure");
-%!   assert (isempty (intersect (objs, hf)));
+%!   assert (! any (objs == hf));
 %! unwind_protect_cleanup
 %!   if (isfigure (hf))
 %!     close (hf);
 %!   endif
 %! end_unwind_protect
 
+%!error close (1,2,3)
+%!error <first argument must be "all" or a figure> close ({"all"})
+%!error <first argument must be "all" or a figure> close ("all_and_more")
+%!error <first argument must be "all" or a figure> close (-1)
+%!error <expecting argument to be "all hidden"> close "all" hid"
+
--- a/scripts/plot/closereq.m
+++ b/scripts/plot/closereq.m
@@ -18,8 +18,7 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} closereq ()
-## Close the current figure and delete all graphics objects associated
-## with it.
+## Close the current figure and delete all graphics objects associated with it.
 ## @seealso{close, delete}
 ## @end deftypefn
 
--- a/scripts/plot/colorbar.m
+++ b/scripts/plot/colorbar.m
@@ -17,9 +17,22 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} colorbar (@var{s})
-## @deftypefnx {Function File} {} colorbar ("peer", @var{h}, @dots{})
-## Add a colorbar to the current axes.  Valid values for @var{s} are
+## @deftypefn  {Command} {} colorbar
+## @deftypefnx {Function File} {} colorbar (@var{loc})
+## @deftypefnx {Function File} {} colorbar (@var{delete_option})
+## @deftypefnx {Function File} {} colorbar (@var{hcb}, @dots{})
+## @deftypefnx {Function File} {} colorbar (@var{hax}, @dots{})
+## @deftypefnx {Function File} {} colorbar (@dots{}, "peer", @var{hax}, @dots{})
+## @deftypefnx {Function File} {} colorbar (@dots{}, "location", @var{loc}, @dots{})
+## @deftypefnx {Function File} {} colorbar (@dots{}, @var{prop}, @var{val}, @dots{})
+## @deftypefnx {Function File} {@var{h} =} colorbar (@dots{})
+## Add a colorbar to the current axes.
+##
+## A colorbar displays the current colormap along with numerical rulings
+## so that the color scale can be interpreted.
+##
+## The optional input @var{loc} determines the location of the colorbar.
+## Valid values for @var{loc} are
 ##
 ## @table @asis
 ## @item "EastOutside"
@@ -45,52 +58,104 @@
 ##
 ## @item "South"
 ## Place the colorbar at the bottom of the plot.
-##
-## @item "Off", "None"
-## Remove any existing colorbar from the plot.
 ## @end table
 ##
+## To remove a colorbar from a plot use any one of the following keywords for
+## the @var{delete_option}: "delete", "hide", "off".
+## 
 ## If the argument "peer" is given, then the following argument is treated
-## as the axes handle on which to add the colorbar.
+## as the axes handle in which to add the colorbar.  Alternatively, 
+## If the first argument @var{hax} is an axes handle, then the colorbar is
+## added to this axis, rather than the current axes returned by @code{gca}.
+##
+## If the first argument @var{hcb} is a handle to a colorbar object, then
+## operate on this colorbar directly.
+##
+## Additional property/value pairs are passed directly to the underlying axes
+## object.
+##
+## The optional return value @var{h} is a graphics handle to the created
+## colorbar object.
+##
+## Implementation Note: A colorbar is created as an additional axes to the
+## current figure with the "tag" property set to "colorbar".  The created
+## axes object has the extra property "location" which controls the positioning
+## of the colorbar.
+## @seealso{colormap}
 ## @end deftypefn
 
 function h = colorbar (varargin)
-  ax = [];
-  loc = "eastoutside";
+
+  [hcb, varargin, nargin] = __plt_get_axis_arg__ ("colorbar", varargin{:});
+
+  if (hcb && ! strcmp (get (hcb, "tag"), "colorbar"))
+    ax = hcb;
+    hcb = [];
+  else
+    ax = [];
+  endif
+  loc = "";
   args = {};
   deleting = false;
 
   i = 1;
   while (i <= nargin)
-    arg = varargin {i++};
+    arg = varargin{i++};
     if (ischar (arg))
-      if (strcmpi (arg, "peer"))
-        if (i > nargin)
-          error ("colorbar: missing axes handle after \"peer\"");
-        else
-          ax = varargin{i++};
-          if (!isscalar (ax) || ! ishandle (ax)
-              || ! strcmp (get (ax, "type"), "axes"))
-            error ("colorbar: expecting an axes handle following \"peer\"");
+      switch (tolower (arg))
+        case "peer"
+          if (i > nargin)
+            error ('colorbar: missing axes handle after "peer"');
+          else
+            ax = varargin{i++};
+            if (! isscalar (ax) && ! isaxes (ax))
+              error ('colorbar: expecting an axes handle following "peer"');
+            endif
           endif
-        endif
-      elseif (strcmpi (arg, "north") || strcmpi (arg, "south")
-              || strcmpi (arg, "east") || strcmpi (arg, "west")
-              || strcmpi (arg, "northoutside") || strcmpi (arg, "southoutside")
-              || strcmpi (arg, "eastoutside") || strcmpi (arg, "westoutside"))
-        loc = tolower (arg);
-      elseif (strcmpi (arg, "location") && i <= nargin)
-        loc = tolower (varargin{i++});
-      elseif (strcmpi (arg, "off") || strcmpi (arg, "none"))
-        deleting = true;
-      else
-        args{end+1} = arg;
-      endif
+        case {"north", "south", "east", "west",
+              "northoutside", "southoutside", "eastoutside", "westoutside"}
+          loc = tolower (arg);
+        case "location"
+          if (i > nargin)
+            error ('colorbar: missing value after "location"');
+          else
+            loc = tolower (varargin{i++});
+          endif
+        case {"delete", "hide", "off", "none"}
+          deleting = true;
+        otherwise
+          args{end+1} = arg;
+      endswitch
     else
       args{end+1} = arg;
     endif
   endwhile
 
+  ## Handle changes to existing colorbar
+  if (! isempty (hcb))
+    if (deleting)
+      delete (hcb);
+      if (nargout > 0)
+        h = hcb;
+      endif
+      return;
+    else
+      ## FIXME: No listener on location property so have to re-create
+      ##        colorbar whenever an option changes.
+      ##        re-instate this code if listener is developed.
+      # if (! isempty (loc))
+      #   set (hcb, "location", loc);
+      # endif
+      # if (! isempty (args))
+      #   set (hcb, args{:});
+      # endif
+      ax = get (get (hcb, "parent"), "currrentaxes");      
+    endif
+  endif
+    
+  if (isempty (loc))
+    loc = "eastoutside";
+  endif
   if (isempty (ax))
     ax = gca ();
   endif
@@ -107,14 +172,16 @@
   end_unwind_protect
 
   if (! deleting)
-    ## FIXME - Matlab does not require the "position" property to be active.
-    ##         Is there a way to determine the plotbox position for the
-    ##         gnuplot graphics toolkit with the outerposition is active?
+    ## FIXME: Matlab does not require the "position" property to be active.
+    ##        Is there a way to determine the plotbox position for the
+    ##        gnuplot graphics toolkit with the outerposition is active?
     set (ax, "activepositionproperty", "position");
     obj = get (ax);
-    obj.__my_handle__ = ax;
+    obj.__cbar_hax__ = ax;
     position = obj.position;
-    clen = rows (get (get (ax, "parent"), "colormap"));
+    ## FIXME: Should this be ancestor to accommodate hggroups?
+    hpar = get (ax, "parent");  
+    clen = rows (get (hpar, "colormap"));
     cext = get (ax, "clim");
     cdiff = (cext(2) - cext(1)) / clen / 2;
     cmin = cext(1) + cdiff;
@@ -124,10 +191,10 @@
         __position_colorbox__ (loc, obj, ancestor (ax, "figure"));
     set (ax, "position", pos);
 
-    cax = __go_axes__ (get (ax, "parent"), "tag", "colorbar",
-                       "handlevisibility", "on",
-                       "activepositionproperty", "position",
-                       "position", cpos);
+    cax = __go_axes__ (hpar, "tag", "colorbar",
+                             "handlevisibility", "on",
+                             "activepositionproperty", "position",
+                             "position", cpos);
     addproperty ("location", cax, "radio",
                  "eastoutside|east|westoutside|west|northoutside|north|southoutside|south",
                  loc);
@@ -137,38 +204,41 @@
       hi = image (cax, [0,1], [cmin, cmax], [1 : clen]');
       if (mirror)
         set (cax, "xtick", [], "xdir", "normal", "ydir", "normal",
-             "ylim", cext, "ylimmode", "manual",
-             "yaxislocation", "right", args{:});
+                  "ylim", cext, "ylimmode", "manual",
+                  "yaxislocation", "right", args{:});
       else
         set (cax, "xtick", [], "xdir", "normal", "ydir", "normal",
-             "ylim", cext, "ylimmode", "manual",
-             "yaxislocation", "left", args{:});
+                  "ylim", cext, "ylimmode", "manual",
+                  "yaxislocation", "left", args{:});
       endif
     else
       hi = image (cax, [cmin, cmax], [0,1], [1 : clen]);
       if (mirror)
         set (cax, "ytick", [], "xdir", "normal", "ydir", "normal",
-             "xlim", cext, "xlimmode", "manual",
-             "xaxislocation", "top", args{:});
+                  "xlim", cext, "xlimmode", "manual",
+                  "xaxislocation", "top", args{:});
       else
         set (cax, "ytick", [], "xdir", "normal", "ydir", "normal",
-             "xlim", cext, "xlimmode", "manual",
-             "xaxislocation", "bottom", args{:});
+                  "xlim", cext, "xlimmode", "manual",
+                  "xaxislocation", "bottom", args{:});
       endif
     endif
 
-    ctext = text (0, 0, "", "tag", "colorbar","visible", "off",
-                  "handlevisibility", "off", "xliminclude", "off",
-                  "yliminclude", "off", "zliminclude", "off",
+    ## Dummy object placed in axis to delete colorbar when axis is deleted.
+    ctext = text (0, 0, "", "tag", "colorbar",
+                  "visible", "off", "handlevisibility", "off",
+                  "xliminclude", "off", "yliminclude", "off",
+                  "zliminclude", "off",
                   "deletefcn", {@deletecolorbar, cax, obj});
 
     set (cax, "deletefcn", {@resetaxis, ax, obj});
 
+    addlistener (hpar, "colormap", {@update_colorbar_cmap, hi, vertical, clen});
     addlistener (ax, "clim", {@update_colorbar_clim, hi, vertical});
+    addlistener (ax, "dataaspectratio", {@update_colorbar_axis, cax, obj});
+    addlistener (ax, "dataaspectratiomode", {@update_colorbar_axis, cax, obj});
     addlistener (ax, "plotboxaspectratio", {@update_colorbar_axis, cax, obj});
     addlistener (ax, "plotboxaspectratiomode", {@update_colorbar_axis, cax, obj});
-    addlistener (ax, "dataaspectratio", {@update_colorbar_axis, cax, obj});
-    addlistener (ax, "dataaspectratiomode", {@update_colorbar_axis, cax, obj});
     addlistener (ax, "position", {@update_colorbar_axis, cax, obj});
 
   endif
@@ -176,42 +246,55 @@
   if (nargout > 0)
     h = cax;
   endif
+
 endfunction
 
 function deletecolorbar (h, d, hc, orig_props)
   ## Don't delete the colorbar and reset the axis size if the
   ## parent figure is being deleted.
-  if (ishandle (hc) && strcmp (get (hc, "type"), "axes")
-      && (isempty (gcbf ()) || strcmp (get (gcbf (), "beingdeleted"),"off")))
+  if (isaxes (hc)
+      && (isempty (gcbf ()) || strcmp (get (gcbf (), "beingdeleted"), "off")))
     if (strcmp (get (hc, "beingdeleted"), "off"))
       delete (hc);
     endif
     if (!isempty (ancestor (h, "axes"))
         && strcmp (get (ancestor (h, "axes"), "beingdeleted"), "off"))
-      set (ancestor (h, "axes"), "position", orig_props.position, ...
-                            "outerposition", orig_props.outerposition, ...
-                    "activepositionproperty", orig_props.activepositionproperty);
+      ax = ancestor (h, "axes");
+      units = get (ax, "units");
+      set (ax, "units", orig_props.units);
+      set (ancestor (h, "axes"), "position", orig_props.position,
+                            "outerposition", orig_props.outerposition,
+                   "activepositionproperty", orig_props.activepositionproperty);
+      set (ax, "units", units);
     endif
   endif
 endfunction
 
 function resetaxis (cax, d, ax, orig_props)
-  if (ishandle (ax) && strcmp (get (ax, "type"), "axes"))
+  if (isaxes (ax))
+    ## FIXME: Probably don't want to delete everyone's listeners on colormap.
+    dellistener (get (ax, "parent"), "colormap");
+    dellistener (ax, "clim");
+    dellistener (ax, "dataaspectratio");
+    dellistener (ax, "dataaspectratiomode");
+    dellistener (ax, "plotboxaspectratio");
+    dellistener (ax, "plotboxaspectratiomode");
     dellistener (ax, "position");
+
     units = get (ax, "units");
     set (ax, "units", orig_props.units);
-    set (ax, "position", orig_props.position, ...
-             "outerposition", orig_props.outerposition, ...
+    set (ax, "position", orig_props.position,
+             "outerposition", orig_props.outerposition,
              "activepositionproperty", orig_props.activepositionproperty);
     set (ax, "units", units);
   endif
 endfunction
 
-function update_colorbar_clim (h, d, hi, vert)
-  if (ishandle (h) && strcmp (get (h, "type"), "image")
-      && (isempty (gcbf ()) || strcmp (get (gcbf (), "beingdeleted"),"off")))
-    clen = rows (get (get (h, "parent"), "colormap"));
-    cext = get (h, "clim");
+function update_colorbar_clim (hax, d, hi, vert)
+  if (isaxes (hax)
+      && (isempty (gcbf ()) || strcmp (get (gcbf (), "beingdeleted"), "off")))
+    clen = rows (get (get (hax, "parent"), "colormap"));
+    cext = get (hax, "clim");
     cdiff = (cext(2) - cext(1)) / clen / 2;
     cmin = cext(1) + cdiff;
     cmax = cext(2) - cdiff;
@@ -226,13 +309,32 @@
   endif
 endfunction
 
+function update_colorbar_cmap (hf, d, hi, vert, init_sz)
+  persistent sz = init_sz;
+
+  if (ishandle (hf) && strcmp (get (hf, "type"), "figure")
+      && (isempty (gcbf ()) || strcmp (get (gcbf (), "beingdeleted"), "off")))
+    clen = rows (get (hf, "colormap"));
+    if (clen != sz)
+      if (vert)
+        set (hi, "cdata", [1:clen]');
+      else
+        set (hi, "cdata", [1:clen]);
+      endif
+      sz = clen;
+      ## Also update limits on axis or there will be white gaps
+      update_colorbar_clim (get (hi, "parent"), d, hi, vert);
+    endif
+  endif
+endfunction
+
 function update_colorbar_axis (h, d, cax, orig_props)
 
-  if (ishandle (cax) && strcmp (get (cax, "type"), "axes")
+  if (isaxes (cax)
       && (isempty (gcbf ()) || strcmp (get (gcbf (), "beingdeleted"),"off")))
     loc = get (cax, "location");
     obj = get (h);
-    obj.__my_handle__ = h;
+    obj.__cbar_hax__ = h;
     obj.position = orig_props.position;
     obj.outerposition = orig_props.outerposition;
     [pos, cpos, vertical, mirror] =  ...
@@ -241,18 +343,18 @@
     if (vertical)
       if (mirror)
         set (cax, "xtick", [], "xdir", "normal", "ydir", "normal",
-             "yaxislocation", "right", "position", cpos);
+                  "yaxislocation", "right", "position", cpos);
       else
         set (cax, "xtick", [], "xdir", "normal", "ydir", "normal",
-             "yaxislocation", "left", "position", cpos);
+                  "yaxislocation", "left", "position", cpos);
       endif
     else
       if (mirror)
         set (cax, "ytick", [], "xdir", "normal", "ydir", "normal",
-             "xaxislocation", "top", "position", cpos);
+                  "xaxislocation", "top", "position", cpos);
       else
         set (cax, "ytick", [], "xdir", "normal", "ydir", "normal",
-             "xaxislocation", "bottom", "position", cpos);
+                  "xaxislocation", "bottom", "position", cpos);
       endif
     endif
 
@@ -265,8 +367,8 @@
   pos = obj.position;
   sz = pos(3:4);
 
-  if (strcmpi (obj.plotboxaspectratiomode, "manual")
-      || strcmpi (obj.dataaspectratiomode, "manual"))
+  if (strcmp (obj.plotboxaspectratiomode, "manual")
+      || strcmp (obj.dataaspectratiomode, "manual"))
     if (isempty (strfind (cbox, "outside")))
       scale = 1.0;
     else
@@ -340,8 +442,8 @@
 
   cpos = [origin, sz];
 
-  if (strcmpi (obj.plotboxaspectratiomode, "manual")
-      || strcmpi (obj.dataaspectratiomode, "manual"))
+  if (strcmp (obj.plotboxaspectratiomode, "manual")
+      || strcmp (obj.dataaspectratiomode, "manual"))
     obj.position = pos;
     actual_pos = __actual_axis_position__ (obj);
     if (strfind (cbox, "outside"))
--- a/scripts/plot/comet.m
+++ b/scripts/plot/comet.m
@@ -29,8 +29,8 @@
 ## time each point is displayed before moving to the next one.  The default for
 ## @var{p} is 0.1 seconds.
 ##
-## If @var{hax} is specified the animation is produced in that axis rather than
-## the current axis.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ## @seealso{comet3}
 ## @end deftypefn
 
@@ -67,8 +67,8 @@
       m = n - dn;
       m = max ([m, 1]);
       k = min ([n, num]);
-      plot (hax, x(1:m), y(1:m), "r", x(m:k), y(m:k), "g", x(k), y(k), "ob");
-      axis (hax, limits);
+      plot (x(1:m), y(1:m), "r", x(m:k), y(m:k), "g", x(k), y(k), "ob");
+      axis (limits);
       drawnow ();
       pause (p);
     endfor
--- a/scripts/plot/comet3.m
+++ b/scripts/plot/comet3.m
@@ -29,8 +29,8 @@
 ## time each point is displayed before moving to the next one.  The default for
 ## @var{p} is 0.1 seconds.
 ##
-## If @var{hax} is specified the animation is produced in that axis rather than
-## the current axis.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ## @seealso{comet}
 ## @end deftypefn
 
@@ -69,9 +69,9 @@
       m = n - dn;
       m = max ([m, 1]);
       k = min ([n, num]);
-      htmp = plot3 (hax, x(1:m), y(1:m), z(1:m), "r",
-                         x(m:k), y(m:k), z(m:k), "g",
-                         x(k), y(k), z(k), "ob");
+      htmp = plot3 (x(1:m), y(1:m), z(1:m), "r",
+                    x(m:k), y(m:k), z(m:k), "g",
+                    x(k), y(k), z(k), "ob");
       axis (limits);
       drawnow ();
       pause (p);
--- a/scripts/plot/compass.m
+++ b/scripts/plot/compass.m
@@ -24,15 +24,17 @@
 ## @deftypefnx {Function File} {@var{h} =} compass (@dots{})
 ##
 ## Plot the @code{(@var{u}, @var{v})} components of a vector field emanating
-## from the origin of a polar plot.  If a single complex argument @var{z} is
-## given, then @code{@var{u} = real (@var{z})} and @code{@var{v} = imag
-## (@var{z})}.
+## from the origin of a polar plot.
+##
+## The arrow representing each vector has one end at the origin and the tip at
+## [@var{u}(i), @var{v}(i)].  If a single complex argument @var{z} is given,
+## then @code{@var{u} = real (@var{z})} and @code{@var{v} = imag (@var{z})}.
 ##
 ## The style to use for the plot can be defined with a line style @var{style}
-## in a similar manner to the line styles used with the @code{plot} command.
+## of the same format as the @code{plot} command.
 ##
-## If the first argument @var{hax} is an axis handle, then plot into these axes,
-## rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a vector of graphics handles to the
 ## line objects representing the drawn vectors.
@@ -100,7 +102,7 @@
   oldfig = ifelse (isempty (hax), [], get (0, "currentfigure"));
   unwind_protect
     hax = newplot (hax);
-    hlist = polar (hax, r, p, line_spec);
+    hlist = polar (r, p, line_spec);
   unwind_protect_cleanup
     if (! isempty (oldfig))
       set (0, "currentfigure", oldfig);
--- a/scripts/plot/contour.m
+++ b/scripts/plot/contour.m
@@ -22,12 +22,27 @@
 ## @deftypefnx {Function File} {} contour (@var{x}, @var{y}, @var{z})
 ## @deftypefnx {Function File} {} contour (@var{x}, @var{y}, @var{z}, @var{vn})
 ## @deftypefnx {Function File} {} contour (@dots{}, @var{style})
-## @deftypefnx {Function File} {} contour (@var{h}, @dots{})
+## @deftypefnx {Function File} {} contour (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {[@var{c}, @var{h}] =} contour (@dots{})
+## Create a 2-D contour plot.
+##
 ## Plot level curves (contour lines) of the matrix @var{z}, using the
 ## contour matrix @var{c} computed by @code{contourc} from the same
-## arguments; see the latter for their interpretation.  The set of
-## contour levels, @var{c}, is only returned if requested.  For example:
+## arguments; see the latter for their interpretation.
+##
+## The appearance of contour lines can be defined with a line style @var{style}
+## in the same manner as @code{plot}.  Only line style and color are used;
+## Any markers defined by @var{style} are ignored.
+##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
+## The optional output @var{c} are the contour levels in @code{contourc} format.
+##
+## The optional return value @var{h} is a graphics handle to the hggroup
+## comprising the contour lines.
+##
+## Example:
 ##
 ## @example
 ## @group
@@ -38,14 +53,8 @@
 ## @end group
 ## @end example
 ##
-## The style to use for the plot can be defined with a line style @var{style}
-## in a similar manner to the line styles used with the @code{plot} command.
-## Any markers defined by @var{style} are ignored.
+## @seealso{ezcontour, contourc, contourf, contour3, clabel, meshc, surfc, caxis, colormap, plot}
 ##
-## 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, contourf, contour3, patch, plot}
 ## @end deftypefn
 
 ## Author: Shai Ayal <shaiay@users.sourceforge.net>
@@ -59,7 +68,6 @@
     hax = newplot (hax);
     
     [ctmp, htmp] = __contour__ (hax, "none", varargin{:});
-    
   unwind_protect_cleanup
     if (! isempty (oldfig))
       set (0, "currentfigure", oldfig);
--- a/scripts/plot/contour3.m
+++ b/scripts/plot/contour3.m
@@ -22,13 +22,32 @@
 ## @deftypefnx {Function File} {} contour3 (@var{x}, @var{y}, @var{z})
 ## @deftypefnx {Function File} {} contour3 (@var{x}, @var{y}, @var{z}, @var{vn})
 ## @deftypefnx {Function File} {} contour3 (@dots{}, @var{style})
-## @deftypefnx {Function File} {} contour3 (@var{h}, @dots{})
+## @deftypefnx {Function File} {} contour3 (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {[@var{c}, @var{h}] =} contour3 (@dots{})
-## Plot level curves (contour lines) of the matrix @var{z}, using the
-## contour matrix @var{c} computed by @code{contourc} from the same
-## arguments; see the latter for their interpretation.  The contours are
-## plotted at the Z level corresponding to their contour.  The set of
-## contour levels, @var{c}, is only returned if requested.  For example:
+## Create a 3-D contour plot.
+##
+## @code{contour3} plots level curves (contour lines) of the matrix @var{z}
+## at a Z level corresponding to each contour.  This is in contrast to
+## @code{contour} which plots all of the contour lines at the same Z level
+## and produces a 2-D plot.
+##
+## The level curves are taken from the contour matrix @var{c} computed by
+## @code{contourc} for the same arguments; see the latter for their
+## interpretation.
+##
+## The appearance of contour lines can be defined with a line style @var{style}
+## in the same manner as @code{plot}.  Only line style and color are used;
+## Any markers defined by @var{style} are ignored.
+##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
+## The optional output @var{c} are the contour levels in @code{contourc} format.
+##
+## The optional return value @var{h} is a graphics handle to the hggroup
+## comprising the contour lines.
+##
+## Example:
 ##
 ## @example
 ## @group
@@ -39,14 +58,7 @@
 ## @end group
 ## @end example
 ##
-## The style to use for the plot can be defined with a line style @var{style}
-## in a similar manner to the line styles used with the @code{plot} command.
-## Any markers defined by @var{style} are ignored.
-##
-## 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, contour, contourf, patch, plot}
+## @seealso{contour, contourc, contourf, clabel, meshc, surfc, caxis, colormap, plot}
 ## @end deftypefn
 
 function [c, h] = contour3 (varargin)
@@ -66,7 +78,7 @@
 
   if (! ishold ())
     set (hax, "view", [-37.5, 30],
-         "xgrid", "on", "ygrid", "on", "zgrid", "on");
+              "xgrid", "on", "ygrid", "on", "zgrid", "on");
   endif
 
   if (nargout > 0)
--- a/scripts/plot/contourc.m
+++ b/scripts/plot/contourc.m
@@ -21,10 +21,20 @@
 ## @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.
+## Compute contour lines (isolines of constant Z value).
+##
+## The matrix @var{z} contains height values above the rectangular grid
+## determined by @var{x} and @var{y}.  If only a single input @var{z} is
+## provided then @var{x} is taken to be @code{1:rows (@var{z})} and @var{y} is
+## taken to be @code{1:columns (@var{z})}.
 ##
-## The return value @var{lev} is a vector of the contour levels.
+## The optional input @var{vn} is either a scalar denoting the number of
+## contour lines to compute or a vector containing the Z values where lines
+## will be computed.  When @var{vn} is a vector the number of contour lines
+## is @code{numel (@var{vn})}.  However, to compute a single contour line
+## at a given value use @code{@var{vn} = [val, val]}.  If @var{vn} is omitted
+## it defaults to 10.
+##
 ## The return value @var{c} is a 2x@var{n} matrix containing the
 ## contour lines in the following format
 ##
@@ -39,13 +49,10 @@
 ## in which contour line @var{n} has a level (height) of @var{levn} and
 ## length of @var{lenn}.
 ##
-## If @var{x} and @var{y} are omitted they are taken as the row/column
-## 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.
+## The optional return value @var{lev} is a vector with the Z values of
+## of the contour levels.
 ##
-## For example:
+## Example:
 ##
 ## @example
 ## @group
@@ -57,7 +64,7 @@
 ##         2.0000   1.0000   2.0000   2.0000   2.0000   1.5000
 ## @end group
 ## @end example
-## @seealso{contour, contourf, contour3}
+## @seealso{contour, contourf, contour3, clabel}
 ## @end deftypefn
 
 ## Author: Shai Ayal <shaiay@users.sourceforge.net>
--- a/scripts/plot/contourf.m
+++ b/scripts/plot/contourf.m
@@ -18,39 +18,35 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} contourf (@var{x}, @var{y}, @var{z}, @var{lvl})
-## @deftypefnx {Function File} {} contourf (@var{x}, @var{y}, @var{z}, @var{n})
+## @deftypefn  {Function File} {} contourf (@var{z})
+## @deftypefnx {Function File} {} contourf (@var{z}, @var{vn})
 ## @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{x}, @var{y}, @var{z}, @var{vn})
+## @deftypefnx {Function File} {} contourf (@dots{}, @var{style})
 ## @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.
+## Create a 2-D contour plot with filled intervals.
 ##
-## 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.
+## Plot level curves (contour lines) of the matrix @var{z} and fill the region
+## between lines with colors from the current colormap.
+##
+## The level curves are taken from the contour matrix @var{c} computed by
+## @code{contourc} for the same arguments; see the latter for their
+## interpretation.
 ##
-## The appearance of the plot can be customized by passing
-## property/value pairs to the function. 
+## The appearance of contour lines can be defined with a line style @var{style}
+## in the same manner as @code{plot}.  Only line style and color are used;
+## Any markers defined by @var{style} are ignored.
 ##
-## If provided, the filled contours are added to the axes object
-## @var{hax} instead of the current axis.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
-## The return value @var{c} is a 2xn matrix containing the contour lines
-## as described in the documentation on the @code{contourc} function.
+## The optional output @var{c} are the contour levels in @code{contourc} format.
 ##
-## The return value @var{h} is handle-vector to the patch objects creating
-## the filled contours.
+## The optional return value @var{h} is a graphics handle to the hggroup
+## comprising the contour lines.
 ##
-## The following example plots filled contours of the @code{peaks}
-## function.
+## The following example plots filled contours of the @code{peaks} function.
 ##
 ## @example
 ## @group
@@ -58,7 +54,7 @@
 ## contourf (x, y, z, -7:9)
 ## @end group
 ## @end example
-## @seealso{contourc, contour, contour3, patch}
+## @seealso{ezcontourf, contour, contourc, contour3, clabel, meshc, surfc, caxis, colormap, plot}
 ## @end deftypefn
 
 ## Author: Kai Habel <kai.habel@gmx.de>
@@ -74,7 +70,6 @@
     
     [ctmp, htmp] = __contour__ (hax, "none", "fill", "on",
                                 "linecolor", "black", varargin{:});
-    
   unwind_protect_cleanup
     if (! isempty (oldfig))
       set (0, "currentfigure", oldfig);
--- a/scripts/plot/copyobj.m
+++ b/scripts/plot/copyobj.m
@@ -17,11 +17,12 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{hnew} =} copyobj (@var{horig})
 ## @deftypefnx {Function File} {@var{hnew} =} copyobj (@var{horig}, @var{hparent})
-## Construct a copy of the object associated with handle @var{horig}
+## Construct a copy of the graphic object associated with handle @var{horig}
 ## and return a handle @var{hnew} to the new object.
+##
 ## If a parent handle @var{hparent} (root, figure, axes, or hggroup) is
-## specified, the copied object will be created as a child to @var{hparent}.
-## @seealso{findobj, get, set, struct2hdl, hdl2struct}
+## specified, the copied object will be created as a child of @var{hparent}.
+## @seealso{struct2hdl, hdl2struct, findobj}
 ## @end deftypefn
 
 ## Author: pdiribarne <pdiribarne@new-host.home>
--- a/scripts/plot/cylinder.m
+++ b/scripts/plot/cylinder.m
@@ -17,24 +17,28 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} cylinder
+## @deftypefn  {Command} {} cylinder
 ## @deftypefnx {Function File} {} cylinder (@var{r})
 ## @deftypefnx {Function File} {} cylinder (@var{r}, @var{n})
+## @deftypefnx {Function File} {} cylinder (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {[@var{x}, @var{y}, @var{z}] =} cylinder (@dots{})
-## @deftypefnx {Function File} {} cylinder (@var{ax}, @dots{})
-## Generate three matrices in @code{meshgrid} format, such that
-## @code{surf (@var{x}, @var{y}, @var{z})} generates a unit cylinder.
-## The matrices are of size @code{@var{n}+1}-by-@code{@var{n}+1}.
-## @var{r} is a vector containing the radius along the z-axis.
-## If @var{n} or @var{r} are omitted then default values of 20 or [1 1]
-## are assumed.
+## Plot a 3-D unit cylinder.
+##
+## The optional input @var{r} is a vector specifying the radius along the
+## unit z-axis.  The default is [1 1] indicating radius 1 at @code{Z == 0}
+## and at @code{Z == 1}.
+##
+## The optional input @var{n} determines the number of faces around the
+## the circumference of the cylinder.  The default value is 20.
 ##
-## Called with no return arguments, @code{cylinder} calls directly
-## @code{surf (@var{x}, @var{y}, @var{z})}.  If an axes handle @var{ax}
-## is passed as the first argument, the surface is plotted to this set
-## of axes.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
-## Examples:
+## If outputs are requested @code{cylinder} returns three matrices in
+## @code{meshgrid} format, such that @code{surf (@var{x}, @var{y}, @var{z})}
+## generates a unit cylinder.
+##
+## Example:
 ##
 ## @example
 ## @group
@@ -43,7 +47,7 @@
 ## title ("a cone");
 ## @end group
 ## @end example
-## @seealso{sphere}
+## @seealso{ellipsoid, rectangle, sphere}
 ## @end deftypefn
 
 function [xx, yy, zz] = cylinder (varargin)
@@ -83,8 +87,7 @@
     unwind_protect
       hax = newplot (hax);
     
-      surf (hax, x, y, z);
-      
+      surf (x, y, z);
     unwind_protect_cleanup
       if (! isempty (oldfig))
         set (0, "currentfigure", oldfig);
--- a/scripts/plot/daspect.m
+++ b/scripts/plot/daspect.m
@@ -22,9 +22,10 @@
 ## @deftypefnx {Function File} {} daspect (@var{mode})
 ## @deftypefnx {Function File} {@var{data_aspect_ratio_mode} =} daspect ("mode")
 ## @deftypefnx {Function File} {} daspect (@var{hax}, @dots{})
-## Query or set the data aspect ratio of the current axes.  The aspect 
-## ratio is a normalized 3-element vector representing the span of the x, y,
-## and z-axis limits.
+## Query or set the data aspect ratio of the current axes.
+##
+## The aspect ratio is a normalized 3-element vector representing the span of
+## the x, y, and z-axis limits.
 ## 
 ## @code{(daspect (@var{mode}))}
 ##
--- a/scripts/plot/diffuse.m
+++ b/scripts/plot/diffuse.m
@@ -20,9 +20,9 @@
 ## @deftypefn {Function File} {} diffuse (@var{sx}, @var{sy}, @var{sz}, @var{lv})
 ## Calculate diffuse reflection strength of a surface defined by the normal
 ## vector elements @var{sx}, @var{sy}, @var{sz}.
-## The light vector can be specified using parameter @var{lv}.  It can be
-## given as 2-element vector [azimuth, elevation] in degrees or as 3-element
-## vector [lx, ly, lz].
+##
+## The light source location vector @var{lv} can be given as 2-element vector
+## [azimuth, elevation] in degrees or as 3-element vector [lx, ly, lz].
 ## @seealso{specular, surfl}
 ## @end deftypefn
 
--- a/scripts/plot/ellipsoid.m
+++ b/scripts/plot/ellipsoid.m
@@ -17,14 +17,25 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {[@var{x}, @var{y}, @var{z}] =} ellipsoid (@var{xc}, @var{yc}, @var{zc}, @var{xr}, @var{yr}, @var{zr}, @var{n})
-## @deftypefnx {Function File} {} ellipsoid (@var{h}, @dots{})
-## Generate three matrices in @code{meshgrid} format that define an
-## ellipsoid.  Called with no return arguments, @code{ellipsoid} calls
-## directly @code{surf (@var{x}, @var{y}, @var{z})}.  If an axes handle
-## is passed as the first argument, the surface is plotted to this
-## set of axes.
-## @seealso{sphere}
+## @deftypefn  {Function File} {} ellipsoid (@var{xc}, @var{yc}, @var{zc}, @var{xr}, @var{yr}, @var{zr}, @var{n})
+## @deftypefnx {Function File} {} ellipsoid (@dots{}, @var{n})
+## @deftypefnx {Function File} {} ellipsoid (@var{hax}, @dots{})
+## @deftypefnx {Function File} {[@var{x}, @var{y}, @var{z}] =} ellipsoid (@dots{})
+## Plot a 3-D ellipsoid.
+##
+## The inputs @var{xc}, @var{yc}, @var{zc} specify the center of the ellipsoid.
+## The inputs @var{xr}, @var{yr}, @var{zr} specify the semi-major axis lengths.
+##
+## The optional input @var{n} determines the number of faces around the
+## the circumference of the cylinder.  The default value is 20.
+## 
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
+## If outputs are requested @code{ellipsoid} returns three matrices in
+## @code{meshgrid} format, such that @code{surf (@var{x}, @var{y}, @var{z})}
+## generates the ellipsoid.
+## @seealso{cylinder, rectangle, sphere}
 ## @end deftypefn
 
 ## Author: Sylvain Pelissier <sylvain.pelissier@gmail.com>
@@ -67,8 +78,7 @@
     unwind_protect
       hax = newplot (hax);
     
-      surf (hax, x, y, z);
-      
+      surf (x, y, z);
     unwind_protect_cleanup
       if (! isempty (oldfig))
         set (0, "currentfigure", oldfig);
--- a/scripts/plot/errorbar.m
+++ b/scripts/plot/errorbar.m
@@ -18,8 +18,9 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} errorbar (@var{args})
-## @deftypefnx {Function File} {@var{h} =} errorbar (@var{args})
-## Create a two-dimensional plot with errorbars.
+## @deftypefnx {Function File} {} errorbar (@var{hax}, @dots{})
+## @deftypefnx {Function File} {@var{h} =} errorbar (@dots{})
+## Create a 2-D with errorbars.
 ##
 ## Many different combinations of arguments are possible.  The simplest
 ## form is
@@ -78,6 +79,12 @@
 ## Set boxxyerrorbars plot style.
 ## @end table
 ##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
+## The optional return value @var{h} is a handle to the hggroup object
+## representing the data plot and errorbars.
+##
 ## Examples:
 ##
 ## @example
@@ -112,7 +119,7 @@
 ## produces an xyerrorbar plot of @var{y} versus @var{x} in which
 ## @var{x} errorbars are drawn from @var{x}-@var{lx} to @var{x}+@var{ux}
 ## and @var{y} errorbars from @var{y}-@var{ly} to @var{y}+@var{uy}.
-## @seealso{semilogxerr, semilogyerr, loglogerr}
+## @seealso{semilogxerr, semilogyerr, loglogerr, plot}
 ## @end deftypefn
 
 ## Created: 18.7.2000
@@ -128,7 +135,6 @@
     hax = newplot (hax);
 
     htmp = __errcomm__ ("errorbar", hax, varargin{:});
-
   unwind_protect_cleanup
     if (! isempty (oldfig))
       set (0, "currentfigure", oldfig);
--- a/scripts/plot/ezcontour.m
+++ b/scripts/plot/ezcontour.m
@@ -35,8 +35,8 @@
 ##
 ## @var{n} is a scalar defining the number of points to use in each dimension.
 ##
-## If the first argument is an axis handle, @var{hax}, then plot into this
-## axis rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the created plot.
 ##
--- a/scripts/plot/ezcontourf.m
+++ b/scripts/plot/ezcontourf.m
@@ -35,8 +35,8 @@
 ##
 ## @var{n} is a scalar defining the number of points to use in each dimension.
 ##
-## If the first argument is an axis handle, @var{hax}, then plot into this
-## axis rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the created plot.
 ##
--- a/scripts/plot/ezmesh.m
+++ b/scripts/plot/ezmesh.m
@@ -44,8 +44,8 @@
 ## If the argument "circ" is given, then the function is plotted over a disk
 ## centered on the middle of the domain @var{dom}.
 ##
-## If the first argument is an axis handle, @var{hax}, then plot into this
-## axis rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the created 
 ## surface object.
--- a/scripts/plot/ezmeshc.m
+++ b/scripts/plot/ezmeshc.m
@@ -44,6 +44,9 @@
 ## If the argument "circ" is given, then the function is plotted over a disk
 ## centered on the middle of the domain @var{dom}.
 ##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
 ## The optional return value @var{h} is a 2-element vector with a graphics
 ## handle for the created mesh plot and a second handle for the created contour
 ## plot.
--- a/scripts/plot/ezplot.m
+++ b/scripts/plot/ezplot.m
@@ -62,11 +62,11 @@
 ## @var{n} is a scalar defining the number of points to use in plotting
 ## the function.
 ##
-## If the first argument is an axis handle, @var{hax}, then plot into this
-## axis rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
-## The optional return value @var{h} is a list of graphics handles in the
-## created plot.
+## The optional return value @var{h} is a vector of graphics handles to
+## the created line objects.
 ##
 ## @seealso{plot, ezplot3, ezpolar, ezcontour, ezcontourf, ezmesh, ezmeshc, ezsurf, ezsurfc}
 ## @end deftypefn
--- a/scripts/plot/ezplot3.m
+++ b/scripts/plot/ezplot3.m
@@ -36,8 +36,8 @@
 ## @var{n} is a scalar defining the number of points to use in plotting the
 ## function.
 ##
-## If the first argument is an axis handle, @var{hax}, then plot into this
-## axis rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the created plot.
 ##
--- a/scripts/plot/ezpolar.m
+++ b/scripts/plot/ezpolar.m
@@ -37,8 +37,8 @@
 ## @var{n} is a scalar defining the number of points to use in plotting
 ## the function.
 ##
-## If the first argument is an axis handle, @var{hax}, then plot into this
-## axis rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the created plot.
 ##
--- a/scripts/plot/ezsurf.m
+++ b/scripts/plot/ezsurf.m
@@ -44,8 +44,8 @@
 ## If the argument "circ" is given, then the function is plotted over a disk
 ## centered on the middle of the domain @var{dom}.
 ##
-## If the first argument is an axis handle, @var{hax}, then plot into this
-## axis rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the created
 ## surface object.
--- a/scripts/plot/ezsurfc.m
+++ b/scripts/plot/ezsurfc.m
@@ -44,8 +44,8 @@
 ## If the argument "circ" is given, then the function is plotted over a disk
 ## centered on the middle of the domain @var{dom}.
 ##
-## If the first argument is an axis handle, @var{hax}, then plot into this
-## axis rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a 2-element vector with a graphics
 ## handle for the created surface plot and a second handle for the created
--- a/scripts/plot/feather.m
+++ b/scripts/plot/feather.m
@@ -24,12 +24,13 @@
 ## @deftypefnx {Function File} {@var{h} =} feather (@dots{})
 ##
 ## Plot the @code{(@var{u}, @var{v})} components of a vector field emanating
-## from equidistant points on the x-axis.  If a single complex argument
-## @var{z} is given, then @code{@var{u} = real (@var{z})} and
-## @code{@var{v} = imag (@var{z})}.
+## from equidistant points on the x-axis.
+##
+## If a single complex argument @var{z} is given, then
+## @code{@var{u} = real (@var{z})} and @code{@var{v} = imag (@var{z})}.
 ##
 ## The style to use for the plot can be defined with a line style @var{style}
-## in a similar manner to the line styles used with the @code{plot} command.
+## of the same format as the @code{plot} command.
 ##
 ## The optional return value @var{h} is a vector of graphics handles to the
 ## line objects representing the drawn vectors.
@@ -97,7 +98,7 @@
   oldfig = ifelse (isempty (hax), [], get (0, "currentfigure"));
   unwind_protect
     hax = newplot (hax);
-    hlist = plot (hax, x, y, line_spec, [1, n], [0, 0], line_spec);
+    hlist = plot (x, y, line_spec, [1, n], [0, 0], line_spec);
   unwind_protect_cleanup
     if (! isempty (oldfig))
       set (0, "currentfigure", oldfig);
--- a/scripts/plot/figure.m
+++ b/scripts/plot/figure.m
@@ -20,12 +20,23 @@
 ## @deftypefn  {Command} {} figure
 ## @deftypefnx {Command} {} figure @var{n}
 ## @deftypefnx {Function File} {} figure (@var{n})
-## @deftypefnx {Function File} {} figure (@var{n}, "@var{property}", @var{value}, @dots{})
-## Set the current plot window to plot window @var{n}.  If no arguments are
-## specified, the next available window number is chosen.
+## @deftypefnx {Function File} {} figure (@dots{}, "@var{property}", @var{value}, @dots{})
+## @deftypefnx {Function File} {@var{h} =} figure (@var{dots})
+## Create a new figure window for plotting.
+##
+## If no arguments are specified, a new figure with the next available number
+## is created.
 ##
-## Multiple property-value pairs may be specified for the figure, but they
-## must appear in pairs.
+## If called with an integer @var{n}, and no such numbered figure exists, then
+## a new figure with the specified number is created.  If the figure already
+## exists then it is made visible and becomes the current figure for plotting.
+## 
+## Multiple property-value pairs may be specified for the figure object, but
+## they must appear in pairs.
+##
+## The optional return value @var{h} is a graphics handle to the created figure
+## object.
+## @seealso{axes, gcf, clf, close}
 ## @end deftypefn
 
 ## Author: jwe, Bill Denney
@@ -86,9 +97,7 @@
     print_usage ();
   endif
 
-  if (strcmp (get (f, "__graphics_toolkit__"), "fltk"))
-    __add_default_menu__ (f);
-  endif
+  __add_default_menu__ (f);
 
   if (nargout > 0)
     h = f;
--- a/scripts/plot/fill.m
+++ b/scripts/plot/fill.m
@@ -26,8 +26,8 @@
 ##
 ## The inputs @var{x} and @var{y} are the coordinates of the polygon vertices.
 ## If the inputs are matrices then the rows represent different vertices and
-## each column produces a different polygon.
-## @code{fill} will close any open polygons before plotting. 
+## each column produces a different polygon.  @code{fill} will close any open
+## polygons before plotting. 
 ##
 ## The input @var{c} determines the color of the polygon.  The simplest form
 ## is a single color specification such as a @code{plot} format or an
@@ -42,10 +42,10 @@
 ## Multiple property/value pairs for the underlying patch object may be
 ## specified, but they must appear in pairs.
 ##
-## If the first argument @var{hax} is an axis handle, then plot into this axis,
-## rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
-## The optional return value @var{h} is an array of graphics handles to
+## The optional return value @var{h} is a vector of graphics handles to
 ## the created patch objects.
 ##
 ## Example: red square
--- a/scripts/plot/findall.m
+++ b/scripts/plot/findall.m
@@ -18,15 +18,21 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{h} =} findall ()
-## @deftypefnx {Function File} {@var{h} =} findall (@var{prop_name}, @var{prop_value})
-## @deftypefnx {Function File} {@var{h} =} findall (@var{h}, @dots{})
-## @deftypefnx {Function File} {@var{h} =} findall (@var{h}, "-depth", @var{d}, @dots{})
-## Find graphics object with specified property values including hidden handles.
+## @deftypefnx {Function File} {@var{h} =} findall (@var{prop_name}, @var{prop_value}, @dots{})
+## @deftypefnx {Function File} {@var{h} =} findall (@var{prop_name}, @var{prop_value}, "-@var{logical_op}", @var{prop_name}, @var{prop_value})
+## @deftypefnx {Function File} {@var{h} =} findall ("-property", @var{prop_name})
+## @deftypefnx {Function File} {@var{h} =} findall ("-regexp", @var{prop_name}, @var{pattern})
+## @deftypefnx {Function File} {@var{h} =} findall (@var{hlist}, @dots{})
+## @deftypefnx {Function File} {@var{h} =} findall (@var{hlist}, "flat", @dots{})
+## @deftypefnx {Function File} {@var{h} =} findall (@var{hlist}, "-depth", @var{d}, @dots{})
+## Find graphics object, including hidden ones, with specified property values.
 ##
-## This function performs the same function as @code{findobj}, but it
-## includes hidden objects in its search.  For full documentation, see
-## @code{findobj}.
-## @seealso{get, set, findobj, allchild}
+## The return value @var{h} is a list of handles to the found graphic objects.
+##
+## @code{findall} performs the same search as @code{findobj}, but it
+## includes hidden objects ("HandleVisibility" = "off").  For full
+## documentation, @pxref{XREFfindobj,,findobj}.
+## @seealso{findobj, allchild, get, set}
 ## @end deftypefn
 
 ## Author: Bill Denney <bill@denney.ws>
@@ -45,8 +51,7 @@
 
 
 %!testif HAVE_FLTK
-%! toolkit = graphics_toolkit ();
-%! graphics_toolkit ("fltk");
+%! toolkit = graphics_toolkit ("fltk");
 %! hf = figure ("visible", "off");
 %! unwind_protect
 %!   h = findall (hf);
--- a/scripts/plot/findobj.m
+++ b/scripts/plot/findobj.m
@@ -18,46 +18,57 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{h} =} findobj ()
-## @deftypefnx {Function File} {@var{h} =} findobj (@var{prop_name}, @var{prop_value})
+## @deftypefnx {Function File} {@var{h} =} findobj (@var{prop_name}, @var{prop_value}, @dots{})
+## @deftypefnx {Function File} {@var{h} =} findobj (@var{prop_name}, @var{prop_value}, "-@var{logical_op}", @var{prop_name}, @var{prop_value})
 ## @deftypefnx {Function File} {@var{h} =} findobj ("-property", @var{prop_name})
 ## @deftypefnx {Function File} {@var{h} =} findobj ("-regexp", @var{prop_name}, @var{pattern})
-## @deftypefnx {Function File} {@var{h} =} findobj ("flat", @dots{})
-## @deftypefnx {Function File} {@var{h} =} findobj (@var{h}, @dots{})
-## @deftypefnx {Function File} {@var{h} =} findobj (@var{h}, "-depth", @var{d}, @dots{})
-## Find graphics object with specified property values.  The simplest form is
+## @deftypefnx {Function File} {@var{h} =} findobj (@var{hlist}, @dots{})
+## @deftypefnx {Function File} {@var{h} =} findobj (@var{hlist}, "flat", @dots{})
+## @deftypefnx {Function File} {@var{h} =} findobj (@var{hlist}, "-depth", @var{d}, @dots{})
+## Find graphics object with specified property values.
+##
+## The simplest form is
 ##
 ## @example
 ## findobj (@var{prop_name}, @var{prop_value})
 ## @end example
 ##
 ## @noindent
-## which returns all of the handles to the objects with the name
-## @var{prop_name} and the name @var{prop_value}.  The search can be limited
-## to a particular object or set of objects and their descendants by
-## passing a handle or set of handles @var{h} as the first argument to
-## @code{findobj}.
+## which returns the handles of all objects which have a property named
+## @var{prop_name} that has the value @var{prop_value}.  If multiple
+## property/value pairs are specified then only objects meeting all of the
+## conditions are returned.
 ##
-## The depth of hierarchy of objects to which to search to can be limited
-## with the "-depth" argument.  To limit the number depth of the hierarchy
-## to search to @var{d} generations of children, and example is
+## The search can be limited to a particular set of objects and their
+## descendants, by passing a handle or set of handles @var{hlist} as the first
+## argument.
+##
+## The depth of the object hierarchy to search can be limited with the "-depth"
+## argument.  An example of searching only three generations of children is:
 ##
 ## @example
-## findobj (@var{h}, "-depth", @var{d}, @var{prop_name}, @var{prop_value})
+## findobj (@var{hlist}, "-depth", @var{d}, @var{prop_name}, @var{prop_value})
 ## @end example
 ##
-## Specifying a depth @var{d} of 0, limits the search to the set of object
-## passed in @var{h}.  A depth @var{d} of 0 is equivalent to the "-flat"
+## Specifying a depth @var{d} of 0, limits the search to the set of objects
+## passed in @var{hlist}.  A depth @var{d} of 0 is equivalent to the "flat"
 ## argument.
 ##
 ## A specified logical operator may be applied to the pairs of @var{prop_name}
-## and @var{prop_value}.  The supported logical operators are "-and", "-or",
+## and @var{prop_value}.  The supported logical operators are: "-and", "-or",
 ## "-xor", "-not".
 ##
-## The objects may also be matched by comparing a regular expression to the
-## property values, where property values that match @code{regexp
-## (@var{prop_value}, @var{pattern})} are returned.  Finally, objects may be
-## matched by property name only, using the "-property" option.
-## @seealso{get, set}
+## Objects may also be matched by comparing a regular expression to the
+## property values, where property values that match
+## @code{regexp (@var{prop_value}, @var{pattern})} are returned.
+##
+## Finally, objects may be matched by property name only by using the
+## "-property" option.
+##
+## Implementation Note: The search only includes objects with visible
+## handles ("HandleVisibility" = "on").  @xref{XREFfindall,,findall}, to
+## search for all objects including hidden ones.
+## @seealso{findall, allchild, get, set}
 ## @end deftypefn
 
 ## Author: Ben Abbott <bpabbott@mac.com>
@@ -316,7 +327,7 @@
 %! assert (h2, h1)
 
 %!test
-%! graphics_toolkit gnuplot;
+%! toolkit = graphics_toolkit ("gnuplot");
 %! hf = figure ("visible", "off");
 %! unwind_protect
 %!   h1 = subplot (2, 2, 1);
@@ -328,11 +339,12 @@
 %!   h = findobj (hf, "userdata", userdata);
 %! unwind_protect_cleanup
 %!   close (hf);
+%!   graphics_toolkit (toolkit);
 %! end_unwind_protect
 %! assert (h, h3)
 
 %!test
-%! graphics_toolkit gnuplot;
+%! toolkit = graphics_toolkit ("gnuplot");
 %! hf = figure ("visible", "off");
 %! unwind_protect
 %!   h1 = subplot (2, 2, 1);
@@ -346,6 +358,7 @@
 %!   h = findobj (hf, 'type', 'axes', '-not', 'tag', '1');
 %! unwind_protect_cleanup
 %!   close (hf);
+%!   graphics_toolkit (toolkit);
 %! end_unwind_protect
 %! assert (h, [h2; h3; h4])
 
--- a/scripts/plot/fplot.m
+++ b/scripts/plot/fplot.m
@@ -33,7 +33,7 @@
 ## given in any order.
 ## @var{tol} is the relative tolerance to use for the plot and defaults
 ## to 2e-3 (.2%).
-## @var{n} is the minimum number of of points to use.  When @var{n} is
+## @var{n} is the minimum number of points to use.  When @var{n} is
 ## specified, the maximum stepsize will be
 ## @code{@var{xhi} - @var{xlo} / @var{n}}.  More than @var{n} points may still
 ## be used in order to meet the relative tolerance requirement.
@@ -54,9 +54,9 @@
 ## @end example
 ##
 ## Note: @code{fplot} works best with continuous functions.  Functions with
-## discontinuities are unlikely to plot well.  This restriction may be
-## removed in the future.
-## @seealso{plot}
+## discontinuities are unlikely to plot well.  This restriction may be removed
+## in the future.
+## @seealso{ezplot, plot}
 ## @end deftypefn
 
 ## Author: Paul Kienzle <pkienzle@users.sf.net>
--- a/scripts/plot/gca.m
+++ b/scripts/plot/gca.m
@@ -18,9 +18,10 @@
 
 ## -*- texinfo -*-
 ## @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,
+## 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,
 ##
 ## @example
 ## @group
@@ -30,9 +31,9 @@
 ## @end example
 ##
 ## @noindent
-## creates an empty axes object, then changes its location and size in
-## the figure window.
-## @seealso{gcf, gco, get, set}
+## creates an empty axes object, then changes its location and size in the
+## figure window.
+## @seealso{gcf, gco, gcbf, gcbo, get, set}
 ## @end deftypefn
 
 ## Author: jwe
--- a/scripts/plot/gcbf.m
+++ b/scripts/plot/gcbf.m
@@ -18,13 +18,15 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {@var{fig} =} gcbf ()
-## Return a handle to the figure containing the object whose callback
-## is currently executing.  If no callback is executing, this function
-## returns the empty matrix.  The handle returned by this function is
-## the same as the second output argument of @code{gcbo}.
+## Return a handle to the figure containing the object whose callback is
+## currently executing.
 ##
-##@seealso{gcbo, gcf, gca}
-##@end deftypefn
+## If no callback is executing, this function returns the empty matrix.  The
+## handle returned by this function is the same as the second output argument
+## of @code{gcbo}.
+##
+## @seealso{gcbo, gcf, gco, gca, get, set}
+## @end deftypefn
 
 function fig = gcbf ()
 
--- a/scripts/plot/gcbo.m
+++ b/scripts/plot/gcbo.m
@@ -19,17 +19,17 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{h} =} gcbo ()
 ## @deftypefnx {Function File} {[@var{h}, @var{fig}] =} gcbo ()
-## Return a handle to the object whose callback is currently
-## executing.  If no callback is executing, this function returns the
-## empty matrix.  This handle is obtained from the root object property
-## "CallbackObject".
+## Return a handle to the object whose callback is currently executing.
+## 
+## If no callback is executing, this function returns the empty matrix.  This
+## handle is obtained from the root object property "CallbackObject".
 ##
 ## When called with a second output argument, return the handle of the figure
 ## containing the object whose callback is currently executing.  If no callback
 ## is executing the second output is also set to the empty matrix.
 ##
-##@seealso{gcbf, gco, gcf, gca}
-##@end deftypefn
+## @seealso{gcbf, gco, gca, gcf, get, set}
+## @end deftypefn
 
 function [h, fig] = gcbo ()
 
--- a/scripts/plot/gcf.m
+++ b/scripts/plot/gcf.m
@@ -18,9 +18,10 @@
 
 ## -*- texinfo -*-
 ## @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,
+## 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,
 ##
 ## @example
 ## @group
@@ -33,8 +34,8 @@
 ## @noindent
 ## 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{gca, gco, get, set}
+## figure to "on" will cause it to be displayed again.
+## @seealso{gca, gco, gcbf, gcbo, get, set}
 ## @end deftypefn
 
 ## Author: jwe, Bill Denney
@@ -46,7 +47,7 @@
     if (isempty (h) || h == 0)
       ## We only have a root figure object, so create a new figure
       ## object and make it the current figure.
-      h = figure (1);
+      h = figure ();
     endif
   else
     print_usage ();
--- a/scripts/plot/gco.m
+++ b/scripts/plot/gco.m
@@ -20,23 +20,24 @@
 ## @deftypefn  {Function File} {@var{h} =} gco ()
 ## @deftypefnx {Function File} {@var{h} =} gco (@var{fig})
 ## Return a handle to the current object of the current figure, or a handle
-## to the current object of the figure with handle @var{fig}.  The current
-## object of a figure is the object that was last clicked on.  It is stored
-## in the CurrentObject property of the target figure.
+## to the current object of the figure with handle @var{fig}.
 ##
-## If the last mouse click didn't occur on any child object of the figure,
-## the current object is the figure itself.
+## The current object of a figure is the object that was last clicked on.  It
+## is stored in the "CurrentObject" property of the target figure.
+##
+## If the last mouse click did not occur on any child object of the figure,
+## then the current object is the figure itself.
 ##
 ## If no mouse click occurred in the target figure, this function returns an
 ## empty matrix.
 ##
-## Note that the value returned by this function is not necessarily the same
-## as the one returned by gcbo during callback execution.  An executing
-## callback can be interrupted by another callback and the current object
-## can be modified.
+## Programming Note: The value returned by this function is not necessarily the
+## same as the one returned by @code{gcbo} during callback execution.  An
+## executing callback can be interrupted by another callback and the current
+## object may be changed.
 ##
-##@seealso{gcbo, gcf, gca, get, set}
-##@end deftypefn
+## @seealso{gcbo, gca, gcf, gcbf, get, set}
+## @end deftypefn
 
 function h = gco ()
 
--- a/scripts/plot/ginput.m
+++ b/scripts/plot/ginput.m
@@ -17,11 +17,20 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {[@var{x}, @var{y}, @var{buttons}] =} ginput (@var{n})
-## Return which mouse buttons were pressed and keys were hit on the current
-## figure.  If @var{n} is defined, then wait for @var{n} mouse clicks
-## before returning.  If @var{n} is not defined, then @code{ginput} will
-## loop until the return key @key{RET} is pressed.
+## @deftypefn  {Function File} {[@var{x}, @var{y}, @var{buttons}] =} ginput (@var{n})
+## @deftypefnx {Function File} {[@var{x}, @var{y}, @var{buttons}] =} ginput ()
+## Return the position and type of mouse button clicks and/or key strokes
+## in the current figure window.
+##
+## If @var{n} is defined, then capture @var{n} events before returning.
+## When @var{n} is not defined @code{ginput} will loop until the return key
+## @key{RET} is pressed.
+##
+## The return values @var{x}, @var{y} are the coordinates where the mouse
+## was clicked in the units of the current axes.  The return value @var{button}
+## is 1, 2, or 3 for the left, middle, or right button.  If a key is pressed
+## the ASCII value is returned in @var{button}.
+## @seealso{gtext}
 ## @end deftypefn
 
 function varargout = ginput (n)
@@ -31,14 +40,15 @@
   endif
 
   f = gcf ();
+  a = gca ();  # Create an axis, if necessary
   drawnow ();
-  toolkit = (get (f, "__graphics_toolkit__"));
+  toolkit = get (f, "__graphics_toolkit__");
 
   varargout = cell (1, nargout);
   if (nargin == 0)
-    [varargout{:}] = feval (strcat ("__", toolkit, "_ginput__"), f);
+    [varargout{:}] = feval (["__" toolkit "_ginput__"], f);
   else
-    [varargout{:}] = feval (strcat ("__", toolkit, "_ginput__"), f, n);
+    [varargout{:}] = feval (["__" toolkit "_ginput__"], f, n);
   endif
 
 endfunction
--- a/scripts/plot/graphics_toolkit.m
+++ b/scripts/plot/graphics_toolkit.m
@@ -21,23 +21,18 @@
 ## @deftypefnx {Function File} {@var{name} =} graphics_toolkit (@var{hlist})
 ## @deftypefnx {Function File} {} graphics_toolkit (@var{name})
 ## @deftypefnx {Function File} {} graphics_toolkit (@var{hlist}, @var{name})
-## Return the default graphics toolkit.  The default graphics toolkit value
-## is assigned to new figures.
-## 
-## @code{graphics_toolkit (@var{hlist})}
-## 
-## Return the graphics toolkits for the figures with handles @var{hlist}.
-## 
-## @code{graphics_toolkit (@var{name})}
+## Query or set the default graphics toolkit which is assigned to new
+## figures.
 ## 
-## Set the default graphics toolkit to @var{name}.  If the toolkit is not
-## already loaded, it is initialized by calling the function
-## @code{__init_@var{name}__}.
+## With no inputs, return the current default graphics toolkit.  If the input
+## is a list of figure graphic handles, @var{hlist}, then return the name
+## of the graphics toolkit in use for each figure.
 ## 
-## @code{graphics_toolkit (@var{hlist}, @var{name})}
-##
-## Set the graphics toolkit for the figures with handles @var{hlist} to
-## @var{name}.
+## When called with a single input @var{name} set the default graphics toolkit
+## to @var{name}.  If the toolkit is not already loaded, it is initialized by
+## calling the function @code{__init_@var{name}__}.  If the first input
+## is a list of figure handles, @var{hlist}, then the graphics toolkit is set
+## to @var{name} for these figures only.
 ## 
 ## @seealso{available_graphics_toolkits}
 ## @end deftypefn
@@ -90,10 +85,10 @@
 
 %!testif HAVE_FLTK
 %! unwind_protect
-%!   hf = figure ("visible", "off"); 
+%!   hf = figure ("visible", "off");
 %!   toolkit = graphics_toolkit ();
 %!   assert (get (0, "defaultfigure__graphics_toolkit__"), toolkit);
-%!   graphics_toolkit (hf, "fltk"); 
+%!   graphics_toolkit (hf, "fltk");
 %!   assert (graphics_toolkit (hf), "fltk");
 %! unwind_protect_cleanup
 %!   close (hf);
--- a/scripts/plot/grid.m
+++ b/scripts/plot/grid.m
@@ -17,31 +17,31 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} grid
-## @deftypefnx {Function File} {} grid on
-## @deftypefnx {Function File} {} grid off
-## @deftypefnx {Function File} {} grid minor
-## @deftypefnx {Function File} {} grid minor on
-## @deftypefnx {Function File} {} grid minor off
+## @deftypefn  {Command} {} grid
+## @deftypefnx {Command} {} grid on
+## @deftypefnx {Command} {} grid off
+## @deftypefnx {Command} {} grid minor
+## @deftypefnx {Command} {} grid minor on
+## @deftypefnx {Command} {} grid minor off
 ## @deftypefnx {Function File} {} grid (@var{hax}, @dots{})
-## Control the display of grid lines on a plot.
+## Control the display of plot grid lines.
 ##
-## The function input may be either @code{"on"}, or @code{"off"}.
+## The function state input may be either "on" or "off".
 ## If it is omitted, the current grid state is toggled.
 ##
-## If the first argument is @code{"minor"} then all further commands
+## When the first argument is "minor" all subsequent commands
 ## modify the minor grid rather than the major grid.
 ##
-## If the first argument is an axis handle, @var{hax}, operate on the
-## specified axis object.
+## If the first argument @var{hax} is an axes handle, then operate on
+## this axis rather than the current axes returned by @code{gca}.
 ##
 ## To control the grid lines for an individual axis use the @code{set}
-## function.  For example,
+## function.  For example:
 ##
 ## @example
 ## set (gca, "ygrid", "on");
 ## @end example
-## @seealso{box}
+## @seealso{axis, box}
 ## @end deftypefn
 
 ## Author: jwe
--- a/scripts/plot/gtext.m
+++ b/scripts/plot/gtext.m
@@ -20,18 +20,20 @@
 ## @deftypefn  {Function File} {} gtext (@var{s})
 ## @deftypefnx {Function File} {} gtext (@{@var{s1}, @var{s2}, @dots{}@})
 ## @deftypefnx {Function File} {} gtext (@{@var{s1}; @var{s2}; @dots{}@})
-## @deftypefnx {Function File} {} gtext (@dots{}, @var{prop}, @var{val})
+## @deftypefnx {Function File} {} gtext (@dots{}, @var{prop}, @var{val}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} gtext (@dots{})
-## Place text on the current figure using the mouse.  The text is defined
-## by the string @var{s}.  If @var{s} is a cell string organized as a row
-## vector then each string of the cell array is written to a separate line.
-## If @var{s} is organized as a column vector then one string element of the
-## cell array is placed for every mouse click.  Additional inputs besides a
-## string or cellstr are passed to the underlying text object as Property-value
-## pairs.
+## Place text on the current figure using the mouse.
+##
+## The text is defined by the string @var{s}.  If @var{s} is a cell string
+## organized as a row vector then each string of the cell array is written to a
+## separate line.  If @var{s} is organized as a column vector then one string
+## element of the cell array is placed for every mouse click.
+##
+## Optional property/value pairs are passed directly to the underlying text
+## objects.
 ##
 ## The optional return value @var{h} is a graphics handle to the created
-## text object.
+## text object(s).
 ## @seealso{ginput, text}
 ## @end deftypefn
 
--- a/scripts/plot/guidata.m
+++ b/scripts/plot/guidata.m
@@ -17,8 +17,17 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{data} =} guidata (@var{handle})
-## @deftypefnx {Function File} {} guidata (@var{handle}, @var{data})
+## @deftypefn  {Function File} {@var{data} =} guidata (@var{h})
+## @deftypefnx {Function File} {} guidata (@var{h}, @var{data})
+## Query or set user-custom GUI data.
+##
+## The GUI data is stored in the figure handle @var{h}.  If @var{h} is not a
+## figure handle then it's parent figure will be used for storage.
+##
+## @var{data} must be a single object which means it is usually preferable
+## for it to be a data container such as a cell array or struct.
+##
+## @seealso{getappdata, setappdata, get, set, getpref, setpref}
 ## @end deftypefn
 
 ## Author: goffioul
--- a/scripts/plot/guihandles.m
+++ b/scripts/plot/guihandles.m
@@ -19,6 +19,8 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {@var{hdata} =} guihandles (@var{handle})
 ## @deftypefnx {Function File} {@var{hdata} =} guihandles
+##   
+## @seealso{guidata, getappdata, setappdata}
 ## @end deftypefn
 
 ## Author: goffioul
--- a/scripts/plot/hdl2struct.m
+++ b/scripts/plot/hdl2struct.m
@@ -18,9 +18,10 @@
 ## @deftypefn {Function File} {@var{s} =} hdl2struct (@var{h})
 ## Return a structure, @var{s}, whose fields describe the properties
 ## of the object, and its children, associated with the handle, @var{h}.
-## The fields of the structure, @var{s}, are "type", "handle", "properties",
-## "children" and "special".
-## @seealso{findobj, get, set, struct2hdl}
+##
+## The fields of the structure @var{s} are "type", "handle", "properties",
+## "children", and "special".
+## @seealso{struct2hdl, findobj}
 ## @end deftypefn
 
 ## Author: pdiribarne <pdiribarne@new-host.home>
--- a/scripts/plot/hggroup.m
+++ b/scripts/plot/hggroup.m
@@ -18,14 +18,25 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} hggroup ()
-## @deftypefnx {Function File} {} hggroup (@var{h})
+## @deftypefnx {Function File} {} hggroup (@var{hax})
 ## @deftypefnx {Function File} {} hggroup (@dots{}, @var{property}, @var{value}, @dots{})
-## Create group object with parent @var{h}.  If no parent is specified,
-## the group is created in the current axes.  Return the handle of the
-## group object created.
+## @deftypefnx {Function File} {@var{h} =} hggroup (@dots{})
+## Create handle graphics group object with axes parent @var{hax}.
+##
+## If no parent is specified, the group is created in the current axes.
+##
+## Multiple property-value pairs may be specified for the hggroup, but they
+## must appear in pairs.
 ##
-## Multiple property-value pairs may be specified for the group, but they
-## must appear in pairs.
+## The optional return value @var{h} is a graphics handle to the created
+## hggroup object.
+##
+## Programming Note: An hggroup is a way to group base graphics objects such
+## as line objects or patch objects into a single unit which can react
+## appropriately.  For example, the individual lines of a contour plot are
+## collected into a single hggroup so that they can be made visible/invisible
+## with a single command, @code{set (hg_handle, "visible", "off")}.
+## 
 ## @end deftypefn
 
 ## Author: goffioul
--- a/scripts/plot/hidden.m
+++ b/scripts/plot/hidden.m
@@ -17,10 +17,10 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} hidden ()
-## @deftypefnx {Function File} {} hidden ("on")
-## @deftypefnx {Function File} {} hidden ("off")
-## @deftypefnx {Function File} {@var{state} =} hidden (@dots{})
+## @deftypefn  {Command} {} hidden
+## @deftypefnx {Command} {} hidden "on"
+## @deftypefnx {Command} {} hidden "off"
+## @deftypefnx {Function File} {@var{mode} =} hidden (@dots{})
 ## Control mesh hidden line removal.
 ##
 ## When called with no argument the hidden line removal state is toggled.
@@ -34,7 +34,7 @@
 ## objects behind the mesh can be seen through the faces (openings) of the
 ## mesh, although the mesh grid lines are still opaque.
 ##
-## @seealso{mesh, meshc, meshz, ezmesh, ezmeshc}
+## @seealso{mesh, meshc, meshz, ezmesh, ezmeshc, trimesh, waterfall}
 ## @end deftypefn
 
 function state = hidden (mode = "toggle")
--- a/scripts/plot/hist.m
+++ b/scripts/plot/hist.m
@@ -23,7 +23,6 @@
 ## @deftypefnx {Function File} {} hist (@var{y}, @var{x}, @var{norm})
 ## @deftypefnx {Function File} {[@var{nn}, @var{xx}] =} hist (@dots{})
 ## @deftypefnx {Function File} {[@dots{}] =} hist (@dots{}, @var{prop}, @var{val})
-##
 ## Produce histogram counts or plots.
 ##
 ## With one vector input argument, @var{y}, plot a histogram of the values
@@ -65,7 +64,7 @@
 ## @end group
 ## @end example
 ##
-## @seealso{bar}
+## @seealso{histc, bar, pie, rose}
 ## @end deftypefn
 
 ## Author: jwe
--- a/scripts/plot/hold.m
+++ b/scripts/plot/hold.m
@@ -45,7 +45,7 @@
 ## @end table
 ##
 ## When given the additional argument @var{hax}, the hold state is modified
-## only for the given axis handle.
+## for this axis rather than the current axes returned by @code{gca}.
 ##
 ## To query the current hold state use the @code{ishold} function.
 ## @seealso{ishold, cla, clf, newplot}
@@ -53,12 +53,10 @@
 
 function hold (varargin)
 
-  if (nargin > 0 && isscalar (varargin{1}) && ishandle (varargin{1})
-      && strcmp (get (varargin{1}, "type"), "axes"))
-    [hax, varargin, nargs] = __plt_get_axis_arg__ ("hold", varargin{:});
-    if (isempty (hax))
-      hax = gca ();
-    endif
+  if (nargin > 0 && isscalar (varargin{1}) && isaxes (varargin{1}))
+    hax = vargin{1};
+    varargin(1) = [];
+    nargs = numel (varargin);
     ## FIXME: Should this be ancestor (hax, "parent")?
     hfig = get (hax, "parent");
   elseif (nargin > 0 && numel (varargin{1}) > 1 && ishandle (varargin{1}))
@@ -73,19 +71,18 @@
   if (nargs == 0)
     turn_hold_off = ishold (hax);
   elseif (nargs == 1)
-    state = varargin{1};
-    if (ischar (state))
-      if (strcmpi (state, "off"))
+    state = tolower (varargin{1});
+    switch (state)
+      case "off"
         turn_hold_off = true;
-      elseif (strcmpi (state, "all"))
+      case "all"
         turn_hold_off = false;
         hold_all = true;
-      elseif (strcmpi (state, "on"))
+      case "on"
         turn_hold_off = false;
-      else
+      otherwise
         error ("hold: invalid hold STATE");
-      endif
-    endif
+    endswitch
   else
     print_usage ();
   endif
new file mode 100644
--- /dev/null
+++ b/scripts/plot/isaxes.m
@@ -0,0 +1,56 @@
+## Copyright (C) 2013 Rik Wehbring
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} isaxes (@var{h})
+## Return true if @var{h} is an axes graphics handle and false otherwise.
+##
+## If @var{h} is a matrix then return a logical array which is true where
+## the elements of @var{h} are axes graphics handles and false where
+## they are not.
+## @seealso{isaxes, ishandle}
+## @end deftypefn
+
+## Author: jwe
+
+function retval = isaxes (h)
+
+  if (nargin != 1)
+    print_usage ();
+  endif
+
+  hlist = ishandle (h);
+  if (any (hlist))
+    retval(hlist) = strcmp (get (h(hlist), "type"), "axes");
+  else
+    retval = hlist;
+  endif
+
+endfunction
+
+
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   hax = axes ();
+%!   assert (isaxes (hax));
+%!   assert (! isaxes (-hax));
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
--- a/scripts/plot/isfigure.m
+++ b/scripts/plot/isfigure.m
@@ -23,7 +23,7 @@
 ## If @var{h} is a matrix then return a logical array which is true where
 ## the elements of @var{h} are figure graphics handles and false where
 ## they are not.
-## @seealso{ishandle}
+## @seealso{isaxes, ishandle}
 ## @end deftypefn
 
 ## Author: jwe
--- a/scripts/plot/ishghandle.m
+++ b/scripts/plot/ishghandle.m
@@ -18,9 +18,10 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} ishghandle (@var{h})
-## 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}.
+## 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
 
--- a/scripts/plot/ishold.m
+++ b/scripts/plot/ishold.m
@@ -18,40 +18,43 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Command} {} ishold
-## @deftypefnx {Function File} {} ishold (@var{h})
+## @deftypefnx {Function File} {} ishold (@var{hax})
+## @deftypefnx {Function File} {} ishold (@var{hfig})
 ## Return true if the next plot will be added to the current plot, or
 ## false if the plot device will be cleared before drawing the next plot.
 ##
-## Optionally, operate on the graphics handle @var{h} rather than the current
-## plot.
-## @seealso{hold}
+## If the first argument is an axes handle @var{hax} or figure handle
+## @var{hfig} then operate on this plot rather than the current one.
+## @seealso{hold, newplot}
 ## @end deftypefn
 
 function retval = ishold (h)
 
+  if (nargin > 1)
+    print_usage ();
+  endif
+
   if (nargin == 0)
     fig = gcf ();
     ax = get (fig, "currentaxes");
-  elseif (nargin == 1)
+  else
     if (ishandle (h))
-      if (isfigure (h))
-        ax = get (h, "currentaxes");
+      if (strcmp (get (h, "type"), "figure"))
         fig = h;
-      elseif (strcmpi (get (h, "type"), "axes"))
+        ax = get (fig, "currentaxes");
+      elseif (strcmp (get (h, "type"), "axes"))
         ax = h;
-        fig = get (h, "parent");
+        fig = get (ax, "parent");
       else
-        error ("ishold: expecting argument to be axes or figure graphics handle");
+        error ("ishold: H must be an axes or figure graphics handle");
       endif
     else
-      error ("ishold: expecting argument to be axes or figure graphics handle");
+      error ("ishold: H must be an axes or figure graphics handle");
     endif
-  else
-    print_usage ();
   endif
 
-  retval = (strcmpi (get (fig, "nextplot"), "add")
-            && ! isempty (ax) && strcmpi (get (ax, "nextplot"), "add"));
+  retval = (strcmp (get (fig, "nextplot"), "add")
+            && ! isempty (ax) && strcmp (get (ax, "nextplot"), "add"));
 
 endfunction
 
--- a/scripts/plot/isocolors.m
+++ b/scripts/plot/isocolors.m
@@ -93,7 +93,6 @@
 ## @end example
 ##
 ## @seealso{isosurface, isonormals}
-##
 ## @end deftypefn
 
 ## Author: Martin Helm <martin@mhelm.de>
--- a/scripts/plot/isprop.m
+++ b/scripts/plot/isprop.m
@@ -25,7 +25,7 @@
 ## Author: Ben Abbott  <bpabbott@mac.com>
 
 function res = isprop (h, prop)
-  ## Check input
+
   if (nargin < 1 || nargin > 2)
     print_usage ();
   endif
--- a/scripts/plot/legend.m
+++ b/scripts/plot/legend.m
@@ -28,13 +28,16 @@
 ## @deftypefnx {Function File} {} legend ("@var{option}")
 ## @deftypefnx {Function File} {[@var{hleg}, @var{hleg_obj}, @var{hplot}, @var{labels}] =} legend (@dots{})
 ##
-## Display a legend for the axes with handle @var{hax}, or the current axes,
-## using the specified strings as labels.  Legend entries may be specified
-## as individual character string arguments, a character array, or a cell
-## array of character strings.  If the handles, @var{hobjs}, are not specified
-## then the legend's strings will be associated with the axes' descendants.
-## @code{legend} works on line graphs, bar graphs, etc.
-## A plot must exist before legend is called.
+## Display a legend for the current axes using the specified strings as labels.
+##
+## Legend entries may be specified as individual character string arguments,
+## a character array, or a cell array of character strings.
+##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.  If the handles,
+## @var{hobjs}, are not specified then the legend's strings will be associated
+## with the axes' descendants.  @code{legend} works on line graphs,
+## bar graphs, etc.  A plot must exist before legend is called.
 ##
 ## The optional parameter @var{pos} specifies the location of the legend
 ## as follows:
@@ -102,7 +105,7 @@
 ## @item "right"
 ##   Place label text to the right of the keys
 ##
-## @item  "off"
+## @item "off"
 ##   Delete the legend object
 ## @end table
 ##
@@ -126,6 +129,10 @@
 ## is taken from the DisplayName property of graphics objects.  If no
 ## labels or DisplayNames are available, then the label text is simply
 ## "data1", "data2", @dots{}, @nospell{"dataN"}.
+##
+## Implementation Note: A legend is implemented as an additional axes object
+## of the current figure with the "tag" set to "legend".  Properties of the
+## legend object may be manipulated directly by using @code{set}.
 ## @end deftypefn
 
 function [hlegend2, hobjects2, hplot2, text_strings2] = legend (varargin)
@@ -246,8 +253,8 @@
   hlegend = [];
   fkids = get (fig, "children");
   for i = 1 : numel (fkids)
-    if (ishandle (fkids(i)) && strcmp (get (fkids(i), "type"), "axes")
-        && (strcmp (get (fkids(i), "tag"), "legend")))
+    if (   strcmp (get (fkids(i), "type"), "axes")
+        && strcmp (get (fkids(i), "tag"), "legend"))
       udata = get (fkids(i), "userdata");
       if (! isempty (intersect (udata.handle, ca)))
         hlegend = fkids(i);
@@ -1052,7 +1059,7 @@
   endif
 
   for i = 1 : numel (ca)
-    if (ishandle (ca(i)) && strcmp (get (ca(i), "type"), "axes")
+    if (isaxes (ca(i))
         && (isempty (gcbf ()) || strcmp (get (gcbf (), "beingdeleted"),"off"))
         && strcmp (get (ca(i), "beingdeleted"), "off"))
       units = get (ca(i), "units");
@@ -1071,7 +1078,7 @@
 endfunction
 
 function deletelegend1 (h, d, ca)
-  if (ishandle (ca) && strcmp (get (ca, "type"), "axes")
+  if (isaxes (ca)
       && (isempty (gcbf ()) || strcmp (get (gcbf (), "beingdeleted"), "off"))
       && strcmp (get (ca, "beingdeleted"), "off"))
     delete (ca);
@@ -1080,7 +1087,7 @@
 
 function deletelegend2 (h, d, ca, pos, outpos, t1, hplots)
   for i = 1 : numel (ca)
-    if (ishandle (ca(i)) && strcmp (get (ca(i), "type"), "axes")
+    if (isaxes (ca(i))
         && (isempty (gcbf ()) || strcmp (get (gcbf (), "beingdeleted"), "off"))
         && strcmp (get (ca(i), "beingdeleted"), "off"))
       if (!isempty (pos) && !isempty(outpos))
@@ -1547,8 +1554,8 @@
 %!  legend (option);
 
 %!test
-%! graphics_toolkit ("gnuplot");
-%! h = figure ("visible", "off", "__graphics_toolkit__", "gnuplot");
+%! toolkit = graphics_toolkit ("gnuplot");
+%! h = figure ("visible", "off");
 %! unwind_protect
 %!   position = get (h, "position");
 %!   plot (rand (3));
@@ -1559,5 +1566,6 @@
 %!   assert (get (h, "position"), position);
 %! unwind_protect_cleanup
 %!   close (h);
+%!   graphics_toolkit (toolkit);
 %! end_unwind_protect
 
--- a/scripts/plot/line.m
+++ b/scripts/plot/line.m
@@ -19,10 +19,11 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} line ()
 ## @deftypefnx {Function File} {} line (@var{x}, @var{y})
-## @deftypefnx {Function File} {} line (@var{x}, @var{y}, @var{property}, @var{value}, @dots{}))
+## @deftypefnx {Function File} {} line (@var{x}, @var{y}, @var{property}, @var{value}, @dots{})
 ## @deftypefnx {Function File} {} line (@var{x}, @var{y}, @var{z})
 ## @deftypefnx {Function File} {} line (@var{x}, @var{y}, @var{z}, @var{property}, @var{value}, @dots{})
 ## @deftypefnx {Function File} {} line (@var{property}, @var{value}, @dots{})
+## @deftypefnx {Function File} {} line (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} line (@dots{})
 ## Create line object from @var{x} and @var{y} (and possibly @var{z}) and
 ## insert in the current axes.
@@ -30,6 +31,9 @@
 ## Multiple property-value pairs may be specified for the line object, but they
 ## must appear in pairs.
 ##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
 ## The optional return value @var{h} is a graphics handle (or vector of handles)
 ## to the line objects created.
 ##
--- a/scripts/plot/linkprop.m
+++ b/scripts/plot/linkprop.m
@@ -17,13 +17,16 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {@var{hlink} =} linkprop (@var{h}, @var{prop})
+## @deftypefn  {Function File} {@var{hlink} =} linkprop (@var{h}, @var{prop})
+## @deftypefnx {Function File} {@var{hlink} =} linkprop (@var{h}, @{@var{prop1}, @var{prop2}, @dots{}@})
 ## Link graphics object properties, such that a change in one is
-## propagated to the others.  The properties to link are given as a
-## string of cell string array by @var{prop} and the objects containing
-## these properties by the handle array @var{h}.
+## propagated to the others.
 ##
-## An example of the use of linkprop is
+## @var{prop} can be a string for a single property, or a cell array of strings
+## for multiple properties.  @var{h} is an array of graphics handles which
+## will have their properties linked.
+##
+## An example of the use of @code{linkprop} is
 ##
 ## @example
 ## @group
--- a/scripts/plot/loglog.m
+++ b/scripts/plot/loglog.m
@@ -19,14 +19,18 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} loglog (@var{y})
 ## @deftypefnx {Function File} {} loglog (@var{x}, @var{y})
-## @deftypefnx {Function File} {} loglog (@var{x}, @var{y}, @var{property}, @var{value}, @dots{})
+## @deftypefnx {Function File} {} loglog (@var{x}, @var{y}, @var{prop}, @var{value}, @dots{})
 ## @deftypefnx {Function File} {} loglog (@var{x}, @var{y}, @var{fmt})
-## @deftypefnx {Function File} {} loglog (@var{h}, @dots{})
+## @deftypefnx {Function File} {} loglog (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} loglog (@dots{})
-## Produce a two-dimensional plot using log scales for both axes.  See
-## the documentation of @code{plot} for a description of the arguments
+## Produce a 2-D plot using logarithmic scales for both axes.
+##
+## See the documentation of @code{plot} for a description of the arguments
 ## that @code{loglog} will accept.
 ##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
 ## The optional return value @var{h} is a graphics handle to the created plot.
 ## @seealso{plot, semilogx, semilogy}
 ## @end deftypefn
--- a/scripts/plot/loglogerr.m
+++ b/scripts/plot/loglogerr.m
@@ -18,9 +18,9 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} loglogerr (@var{args})
-## @deftypefnx {Function File} {@var{h} =} loglogerr (@var{args})
-## Produce two-dimensional plots on a double logarithm axis with
-## errorbars.
+## @deftypefnx {Function File} {} loglogerr (@var{hax}, @dots{})
+## @deftypefnx {Function File} {@var{h} =} loglogerr (@dots{})
+## Produce 2-D plots on a double logarithm axis with errorbars.
 ##
 ## Many different combinations of arguments are possible.  The most common
 ## form is
@@ -32,8 +32,8 @@
 ## @noindent
 ## which produces a double logarithm plot of @var{y} versus @var{x}
 ## with errors in the @var{y}-scale defined by @var{ey} and the plot
-## format defined by @var{fmt}.  See @code{errorbar} for available formats and
-## additional information.
+## format defined by @var{fmt}.  @xref{XREFerrorbar,,errorbar}, for available
+## formats and additional information.
 ## @seealso{errorbar, semilogxerr, semilogyerr}
 ## @end deftypefn
 
--- a/scripts/plot/mesh.m
+++ b/scripts/plot/mesh.m
@@ -20,22 +20,37 @@
 ## @deftypefn  {Function File} {} mesh (@var{x}, @var{y}, @var{z})
 ## @deftypefnx {Function File} {} mesh (@var{z})
 ## @deftypefnx {Function File} {} mesh (@dots{}, @var{c})
+## @deftypefnx {Function File} {} mesh (@dots{}, @var{prop}, @var{val}, @dots{})
 ## @deftypefnx {Function File} {} mesh (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} mesh (@dots{})
-## Plot a mesh given matrices @var{x}, and @var{y} from @code{meshgrid} and
-## a matrix @var{z} corresponding to the @var{x} and @var{y} coordinates of
-## the mesh.  If @var{x} and @var{y} are vectors, then a typical vertex
-## is (@var{x}(j), @var{y}(i), @var{z}(i,j)).  Thus, columns of @var{z}
-## correspond to different @var{x} values and rows of @var{z} correspond
-## to different @var{y} values.
+## Plot a 3-D wireframe mesh.
+##
+## The wireframe mesh is plotted using rectangles.  The vertices of the
+## rectangles [@var{x}, @var{y}] are typically the output of @code{meshgrid}.
+## over a 2-D rectangular region in the x-y plane.  @var{z} determines the
+## height above the plane of each vertex.  If only a single @var{z} matrix is
+## given, then it is plotted over the meshgrid
+## @code{@var{x} = 1:columns (@var{z}), @var{y} = 1:rows (@var{z})}.
+## Thus, columns of @var{z} correspond to different @var{x} values and rows
+## of @var{z} correspond to different @var{y} values.  
 ##
-## The color of the mesh is derived from the @code{colormap}
-## and the value of @var{z}.  Optionally the color of the mesh can be
-## specified independent of @var{z}, by adding a fourth matrix, @var{c}.
+## The color of the mesh is computed by linearly scaling the @var{Z} values
+## to fit the range of the current colormap.  Use @code{caxis} and/or
+## change the colormap to control the appearance.
+##
+## Optionally, the color of the mesh can be specified independently of @var{z}
+## by supplying a color matrix, @var{c}.
+##
+## Any property/value pairs are passed directly to the underlying surface
+## object.
+##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the created
 ## surface object.
-## @seealso{colormap, contour, meshgrid, surf}
+##
+## @seealso{ezmesh, meshc, meshz, trimesh, contour, surf, surface, meshgrid, hidden, shading, colormap, caxis}
 ## @end deftypefn
 
 ## Author: jwe
@@ -51,14 +66,14 @@
   oldfig = ifelse (isempty (hax), [], get (0, "currentfigure"));
   unwind_protect
     hax = newplot (hax);
-    htmp = surface (hax, varargin{:});
+
+    htmp = surface (varargin{:});
 
     set (htmp, "facecolor", "w");
     set (htmp, "edgecolor", "flat");
-
     if (! ishold ())
       set (hax, "view", [-37.5, 30],
-               "xgrid", "on", "ygrid", "on", "zgrid", "on");
+                "xgrid", "on", "ygrid", "on", "zgrid", "on");
     endif
   unwind_protect_cleanup
     if (! isempty (oldfig))
--- a/scripts/plot/meshc.m
+++ b/scripts/plot/meshc.m
@@ -17,14 +17,40 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} meshc (@var{x}, @var{y}, @var{z})
-## Plot a mesh and contour given matrices @var{x}, and @var{y} from
-## @code{meshgrid} and a matrix @var{z} corresponding to the @var{x} and
-## @var{y} coordinates of the mesh.  If @var{x} and @var{y} are vectors,
-## then a typical vertex is (@var{x}(j), @var{y}(i), @var{z}(i,j)).  Thus,
-## columns of @var{z} correspond to different @var{x} values and rows of
-## @var{z} correspond to different @var{y} values.
-## @seealso{meshgrid, mesh, contour}
+## @deftypefn  {Function File} {} meshc (@var{x}, @var{y}, @var{z})
+## @deftypefnx {Function File} {} meshc (@var{z})
+## @deftypefnx {Function File} {} meshc (@dots{}, @var{c})
+## @deftypefnx {Function File} {} meshc (@dots{}, @var{prop}, @var{val}, @dots{})
+## @deftypefnx {Function File} {} meshc (@var{hax}, @dots{})
+## @deftypefnx {Function File} {@var{h} =} meshc (@dots{})
+## Plot a 3-D wireframe mesh with underlying contour lines.
+##
+## The wireframe mesh is plotted using rectangles.  The vertices of the
+## rectangles [@var{x}, @var{y}] are typically the output of @code{meshgrid}.
+## over a 2-D rectangular region in the x-y plane.  @var{z} determines the
+## height above the plane of each vertex.  If only a single @var{z} matrix is
+## given, then it is plotted over the meshgrid
+## @code{@var{x} = 1:columns (@var{z}), @var{y} = 1:rows (@var{z})}.
+## Thus, columns of @var{z} correspond to different @var{x} values and rows
+## of @var{z} correspond to different @var{y} values.  
+## 
+## The color of the mesh is computed by linearly scaling the @var{Z} values
+## to fit the range of the current colormap.  Use @code{caxis} and/or
+## change the colormap to control the appearance.
+##
+## Optionally the color of the mesh can be specified independently of @var{z}
+## by supplying a color matrix, @var{c}.
+##
+## Any property/value pairs are passed directly to the underlying surface
+## object.
+##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
+## The optional return value @var{h} is a 2-element vector with a graphics
+## handle to the created surface object and to the created contour plot.
+##
+## @seealso{ezmeshc, mesh, meshz, contour, surfc, surface, meshgrid, hidden, shading, colormap, caxis}
 ## @end deftypefn
 
 function h = meshc (varargin)
@@ -39,14 +65,13 @@
   unwind_protect
     hax = newplot (hax);
 
-    htmp = surface (hax, varargin{:});
+    htmp = surface (varargin{:});
 
     ## FIXME - gnuplot does not support a filled surface and a
     ## non-filled contour.  3D filled patches are also not supported.
     ## Thus, the facecolor will be transparent for the gnuplot backend.
     set (htmp, "facecolor", "w");
     set (htmp, "edgecolor", "flat");
-
     if (! ishold ())
       set (hax, "view", [-37.5, 30],
                 "xgrid", "on", "ygrid", "on", "zgrid", "on");
@@ -55,7 +80,6 @@
     drawnow ();
 
     zmin = get (hax, "zlim")(1);
-
     [~, htmp2] = __contour__ (hax, zmin, varargin{:});
 
     htmp = [htmp; htmp2];
--- a/scripts/plot/meshgrid.m
+++ b/scripts/plot/meshgrid.m
@@ -17,9 +17,10 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {[@var{xx}, @var{yy}, @var{zz}] =} meshgrid (@var{x}, @var{y}, @var{z})
-## @deftypefnx {Function File} {[@var{xx}, @var{yy}] =} meshgrid (@var{x}, @var{y})
+## @deftypefn  {Function File} {[@var{xx}, @var{yy}] =} meshgrid (@var{x}, @var{y})
+## @deftypefnx {Function File} {[@var{xx}, @var{yy}, @var{zz}] =} meshgrid (@var{x}, @var{y}, @var{z})
 ## @deftypefnx {Function File} {[@var{xx}, @var{yy}] =} meshgrid (@var{x})
+## @deftypefnx {Function File} {[@var{xx}, @var{yy}, @var{zz}] =} meshgrid (@var{x})
 ## Given vectors of @var{x} and @var{y} and @var{z} coordinates, and
 ## returning 3 arguments, return three-dimensional arrays corresponding
 ## to the @var{x}, @var{y}, and @var{z} coordinates of a mesh.  When
@@ -28,7 +29,7 @@
 ## copies of @var{x}, and the columns of @var{yy} are copies of @var{y}.
 ## If @var{y} is omitted, then it is assumed to be the same as @var{x},
 ## and @var{z} is assumed the same as @var{y}.
-## @seealso{mesh, contour}
+## @seealso{ndgrid, mesh, contour, surf}
 ## @end deftypefn
 
 ## Author: jwe
--- a/scripts/plot/meshz.m
+++ b/scripts/plot/meshz.m
@@ -17,14 +17,40 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} meshz (@var{x}, @var{y}, @var{z})
-## Plot a curtain mesh given matrices @var{x}, and @var{y} from
-## @code{meshgrid} and a matrix @var{z} corresponding to the @var{x} and
-## @var{y} coordinates of the mesh.  If @var{x} and @var{y} are vectors,
-## then a typical vertex is (@var{x}(j), @var{y}(i), @var{z}(i,j)).  Thus,
-## columns of @var{z} correspond to different @var{x} values and rows of
-## @var{z} correspond to different @var{y} values.
-## @seealso{meshgrid, mesh, contour}
+## @deftypefn  {Function File} {} meshz (@var{x}, @var{y}, @var{z})
+## @deftypefnx {Function File} {} meshz (@var{z})
+## @deftypefnx {Function File} {} meshz (@dots{}, @var{c})
+## @deftypefnx {Function File} {} meshz (@dots{}, @var{prop}, @var{val}, @dots{})
+## @deftypefnx {Function File} {} meshz (@var{hax}, @dots{})
+## @deftypefnx {Function File} {@var{h} =} meshz (@dots{})
+## Plot a 3-D wireframe mesh with a surrounding curtain.
+##
+## The wireframe mesh is plotted using rectangles.  The vertices of the
+## rectangles [@var{x}, @var{y}] are typically the output of @code{meshgrid}.
+## over a 2-D rectangular region in the x-y plane.  @var{z} determines the
+## height above the plane of each vertex.  If only a single @var{z} matrix is
+## given, then it is plotted over the meshgrid
+## @code{@var{x} = 1:columns (@var{z}), @var{y} = 1:rows (@var{z})}.
+## Thus, columns of @var{z} correspond to different @var{x} values and rows
+## of @var{z} correspond to different @var{y} values.  
+##
+## The color of the mesh is computed by linearly scaling the @var{Z} values
+## to fit the range of the current colormap.  Use @code{caxis} and/or
+## change the colormap to control the appearance.
+##
+## Optionally the color of the mesh can be specified independently of @var{z}
+## by supplying a color matrix, @var{c}.
+##
+## Any property/value pairs are passed directly to the underlying surface
+## object.
+##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
+## The optional return value @var{h} is a graphics handle to the created
+## surface object.
+##
+## @seealso{mesh, meshc, contour, surf, surface, waterfall, meshgrid, hidden, shading, colormap, caxis}
 ## @end deftypefn
 
 function h = meshz (varargin)
@@ -77,7 +103,7 @@
   oldfig = ifelse (isempty (hax), [], get (0, "currentfigure"));
   unwind_protect
     hax = newplot (hax);
-    htmp = mesh (hax, x, y, z, varargin{charidx:end});
+    htmp = mesh (x, y, z, varargin{charidx:end});
   unwind_protect_cleanup
     if (! isempty (oldfig))
       set (0, "currentfigure", oldfig);
--- a/scripts/plot/module.mk
+++ b/scripts/plot/module.mk
@@ -118,6 +118,7 @@
   plot/hidden.m \
   plot/hist.m \
   plot/hold.m \
+  plot/isaxes.m \
   plot/isfigure.m \
   plot/ishghandle.m \
   plot/ishold.m \
--- a/scripts/plot/newplot.m
+++ b/scripts/plot/newplot.m
@@ -56,9 +56,10 @@
 ## plot, but preserves special settings such as log scaling for axes.
 ## This is equivalent to @code{cla}.
 ##
-## @item "replace" (default) @tab Delete all child objects of the axis and reset all axis
-## properties to their defaults.  However, the following properties
-## are not reset: Position, Units.  This is equivalent to @code{cla reset}.
+## @item "replace" (default) @tab Delete all child objects of the axis and
+## reset all axis properties to their defaults.  However, the following
+## properties are not reset: Position, Units.  This is equivalent to
+## @code{cla reset}.
 ##
 ## @end multitable    
 ##
@@ -76,7 +77,7 @@
 ##        which are not deleted when the figure and axes are prepared.
 ##        I'm sure there is a good reason for that, but coding such
 ##        compatibility is really tricky and doesn't serve much purpose since
-##        newplot is nearly exclusively used by Octave internal plotting
+##        newplot is nearly exclusively used by Octave's internal plotting
 ##        functions.  In Octave's case the argument is almost always null,
 ##        or occasionally the axis handle to plot into.
 
--- a/scripts/plot/orient.m
+++ b/scripts/plot/orient.m
@@ -17,15 +17,22 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} orient (@var{orientation})
-## Set the default print orientation.  Valid values for
-## @var{orientation} include @code{"landscape"}, @code{"portrait"},
-## and @code{"tall"}.
+## @deftypefn  {Function File} {} orient (@var{orientation})
+## @deftypefnx {Function File} {} orient (@var{hfig}, @var{orientation})
+## @deftypefnx {Function File} {@var{orientation} =} orient ()
+## @deftypefnx {Function File} {@var{orientation} =} orient (@var{hfig})
+## Query or set the default print orientation.
+##
+## Valid values for @var{orientation} are "landscape", "portrait", and "tall".
 ##
-## The @code{"tall"} option sets the orientation to portait and fills
-## the page with the plot, while leaving a 0.25in border.
+## The "tall" option sets the orientation to portait and fills
+## the page with the plot, while leaving a 0.25 inch border.
 ##
-## If called with no arguments, return the default print orientation.
+## When called with no arguments, return the default print orientation.
+##
+## If the first argument @var{hfig} is a figure handle, then operate on this
+## figure rather than the current figure returned by @code{gcf}.
+## @seealso{print, saveas}
 ## @end deftypefn
 
 ## Author: Paul Kienzle
@@ -49,8 +56,8 @@
     orientation = varargin{1};
     if (strcmpi (orientation, "landscape") || strcmpi (orientation, "portrait"))
       if (! strcmpi (get (cf, "paperorientation"), orientation))
-        ## FIXME - with the proper listeners in place there won't be a need to set
-        ##         the papersize and paperpostion here.
+        ## FIXME: with the proper listeners in place there won't be a need to
+        ##        set the papersize and paperpostion here.
         papersize = get (cf, "papersize");
         paperposition = get (cf, "paperposition");
         set (cf, "paperorientation", orientation);
--- a/scripts/plot/pareto.m
+++ b/scripts/plot/pareto.m
@@ -18,29 +18,33 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} pareto (@var{x})
-## @deftypefnx {Function File} {} pareto (@var{x}, @var{y})
-## @deftypefnx {Function File} {} pareto (@var{h}, @dots{})
+## @deftypefn  {Function File} {} pareto (@var{y})
+## @deftypefnx {Function File} {} pareto (@var{y}, @var{x})
+## @deftypefnx {Function File} {} pareto (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} pareto (@dots{})
-## Draw a Pareto chart, also called ABC chart.  A Pareto chart is a bar graph
-## used to arrange information in such a way that priorities for process
-## improvement can be established.  It organizes and displays information
-## to show the relative importance of data.  The chart is similar to the
-## histogram or bar chart, except that the bars are arranged in decreasing
-## order from left to right along the abscissa.
+## Draw a Pareto chart.
+##
+## A Pareto chart is a bar graph that arranges information in such a way
+## that priorities for process improvement can be established;  It organizes
+## and displays information to show the relative importance of data.  The chart
+## is similar to the histogram or bar chart, except that the bars are arranged
+## in decreasing magnitude from left to right along the x-axis.
 ##
 ## The fundamental idea (Pareto principle) behind the use of Pareto
 ## diagrams is that the majority of an effect is due to a small subset of the
-## causes, so for quality improvement the first few (as presented on the
-## diagram) contributing causes to a problem usually account for the majority
-## of the result.  Thus, targeting these "major causes" for elimination
-## results in the most cost-effective improvement scheme.
+## causes.  For quality improvement, the first few contributing causes 
+## (leftmost bars as presented on the diagram) to a problem usually account for
+## the majority of the result.  Thus, targeting these "major causes" for
+## elimination results in the most cost-effective improvement scheme.
 ##
-## 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
+## Typically only the magnitude data @var{y} is present in which case
+## @var{x} is taken to be the range @code{1 : length (@var{y})}.  If @var{x}
+## is given it may be a string array, a cell array of strings, or a numerical
 ## vector.
 ##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
 ## The optional return value @var{h} is a 2-element vector with a graphics
 ## handle for the created bar plot and a second handle for the created line
 ## plot.
@@ -55,7 +59,7 @@
 ## pareto (Sold, Cheese);
 ## @end group
 ## @end example
-## @seealso{bar, barh, pie, plot}
+## @seealso{bar, barh, hist, pie, plot}
 ## @end deftypefn
 
 function h = pareto (varargin)
--- a/scripts/plot/patch.m
+++ b/scripts/plot/patch.m
@@ -21,29 +21,58 @@
 ## @deftypefnx {Function File} {} patch (@var{x}, @var{y}, @var{c})
 ## @deftypefnx {Function File} {} patch (@var{x}, @var{y}, @var{z}, @var{c})
 ## @deftypefnx {Function File} {} patch (@var{fv})
-## @deftypefnx {Function File} {} patch ("Faces", @var{f}, "Vertices", @var{v}, @dots{})
-## @deftypefnx {Function File} {} patch (@dots{}, @var{prop}, @var{val})
-## @deftypefnx {Function File} {} patch (@var{h}, @dots{})
+## @deftypefnx {Function File} {} patch ("Faces", @var{faces}, "Vertices", @var{verts}, @dots{})
+## @deftypefnx {Function File} {} patch (@dots{}, @var{prop}, @var{val}, @dots{})
+## @deftypefnx {Function File} {} patch (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} patch (@dots{})
-## Create patch object from @var{x} and @var{y} with color @var{c} and
-## insert in the current axes object.  Return handle to patch object.
+## Create patch object in the current axes with vertices at locations
+## (@var{x}, @var{y}) and of color @var{c}.
+##
+## If the vertices are matrices of size @nospell{MxN} then each polygon patch
+## has M vertices and a total of N polygons will be created.  If some polygons
+## do not have M vertices use NaN to represent "no vertex".  If the @var{z}
+## input is present then 3-D patches will be created.
+##
+## The color argument @var{c} can take many forms.  To create polygons
+## which all share a single color use a string value (e.g., "r" for
+## red), a scalar value which is scaled by @code{caxis} and indexed into the
+## current colormap, or a 3-element RGB vector with the precise TrueColor.
 ##
-## For a uniform colored patch, @var{c} can be given as an RGB vector,
-## scalar value referring to the current colormap, or string value (for
-## example, "r" or "red").
+## If @var{c} is a vector of length N then the ith polygon will have a color
+## determined by scaling entry @var{c}(i) according to @code{caxis} and then
+## indexing into the current colormap.  More complicated coloring situations
+## require directly manipulating patch property/value pairs.
 ##
-## If passed a structure @var{fv} contain the fields "vertices", "faces"
-## and optionally "facevertexcdata", create the patch based on these
-## properties.
+## Instead of specifying polygons by matrices @var{x} and @var{y}, it is
+## possible to present a unique list of vertices and then a list of polygon
+## faces created from those vertices.  In this case the "Vertices" matrix will
+## be an @nospell{Nx2} (2-D patch) or @nospell{Nx3} (3-D path).  The
+## @nospell{MxN} "Faces" matrix describes M polygons having N vertices---each
+## row describes a single polygon and each column entry is an index into the
+## "Vertices" matrix to identify a vertex.  The patch object can be created by
+## directly passing the property/value pairs "Vertices"/@var{verts},
+## "Faces"/@var{faces} as inputs.
+##
+## A third input form is to create a structure @var{fv} with the fields
+## "vertices", "faces", and optionally "facevertexcdata".
+##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the created patch
 ## object.
-## @seealso{fill}
+##
+## Implementation Note: Patches are highly configurable objects.  To truly
+## customize them requires setting patch properties directly.  Useful patch
+## properties are: "cdata", "edgecolor", "facecolor", "faces",
+## "facevertexcdata",
+##
+## @seealso{fill, get, set}
 ## @end deftypefn
 
 ## Author: jwe
 
-function retval = patch (varargin)
+function h = patch (varargin)
 
   [hax, varargin] = __plt_get_axis_arg__ ("patch", varargin{:});
   
@@ -58,7 +87,7 @@
   endif
 
   if (nargout > 0)
-    retval = htmp;
+    h = htmp;
   endif
 
 endfunction
--- a/scripts/plot/pcolor.m
+++ b/scripts/plot/pcolor.m
@@ -21,7 +21,7 @@
 ## @deftypefnx {Function File} {} pcolor (@var{c})
 ## @deftypefnx {Function File} {} pcolor (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} pcolor (@dots{})
-## Produce a 2D density plot.
+## Produce a 2-D density plot.
 ##
 ## A @code{pcolor} plot draws rectangles with colors from the matrix @var{c}
 ## over the two-dimensional region represented by the matrices @var{x} and
@@ -45,8 +45,8 @@
 ## "faceted", which renders a single color for each cell's face with the edge
 ## visible.
 ##
-## If the first argument @var{hax} is an axis handle, then plot into this axis,
-## rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the created
 ## surface object.
@@ -81,7 +81,6 @@
 
     set (htmp, "facecolor", "flat");
     set (hax, "box", "on");
-
     if (! ishold ())
       set (hax, "view", [0, 90]);
     endif
@@ -102,7 +101,7 @@
 %!demo
 %! clf;
 %! colormap ('default');
-%! [~,~,Z] = peaks ();
+%! Z = peaks ();
 %! pcolor (Z);
 
 %!demo
--- a/scripts/plot/peaks.m
+++ b/scripts/plot/peaks.m
@@ -22,11 +22,12 @@
 ## @deftypefnx {Function File} {} peaks (@var{x}, @var{y})
 ## @deftypefnx {Function File} {@var{z} =} peaks (@dots{})
 ## @deftypefnx {Function File} {[@var{x}, @var{y}, @var{z}] =} peaks (@dots{})
-## Generate a function with lots of local maxima and minima.  The function
-## has the form
+## Plot a function with lots of local maxima and minima.
+##
+## The function has the form
 ##
 ## @tex
-## $f(x,y) = 3 (1 - x) ^ 2 e ^ {\left(-x^2 - (y+1)^2\right)} - 10 \left({x \over 5} - x^3 - y^5)\right) - {1 \over 3} e^{\left(-(x+1)^2 - y^2\right)}$
+## $$f(x,y) = 3 (1 - x) ^ 2 e ^ {\left(-x^2 - (y+1)^2\right)} - 10 \left({x \over 5} - x^3 - y^5)\right) - {1 \over 3} e^{\left(-(x+1)^2 - y^2\right)}$$
 ## @end tex
 ## @ifnottex
 ## @verbatim
@@ -37,14 +38,21 @@
 ## @end ifnottex
 ##
 ## Called without a return argument, @code{peaks} plots the surface of the
-## above function using @code{mesh}.  If @var{n} is a scalar, the @code{peaks}
-## returns the values of the above function on a @var{n}-by-@var{n} mesh over
-## the range @code{[-3,3]}.  The default value for @var{n} is 49.
+## above function using @code{surf}.
+## 
+## If @var{n} is a scalar, @code{peaks} plots the value of the above
+## function on an @var{n}-by-@var{n} mesh over the range [-3,3].  The
+## default value for @var{n} is 49.
 ##
-## If @var{n} is a vector, then it represents the @var{x} and @var{y} values
-## of the grid on which to calculate the above function.  The @var{x} and
-## @var{y} values can be specified separately.
-## @seealso{surf, mesh, meshgrid}
+## If @var{n} is a vector, then it represents the grid values over which
+## to calculate the function.  If @var{x} and @var{y} are specified then
+## the function value is calculated over the specified grid of vertices.
+##
+## When called with output arguments, return the data for the function
+## evaluated over the meshgrid.  This can subsequently be plotted with
+## @code{surf (@var{x}, @var{y}, @var{z})}.
+## 
+## @seealso{sombrero, meshgrid, mesh, surf}
 ## @end deftypefn
 
 ## Expression for the peaks function was taken from the following paper:
--- a/scripts/plot/pie.m
+++ b/scripts/plot/pie.m
@@ -35,8 +35,8 @@
 ## The optional input @var{labels} is a cell array of strings of the same
 ## length as @var{x} specifying the label for each slice.
 ## 
-## If the first argument @var{hax} is an axis handle, then plot into these axes,
-## rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a list of handles to the patch
 ## and text objects generating the plot.
--- a/scripts/plot/pie3.m
+++ b/scripts/plot/pie3.m
@@ -36,11 +36,11 @@
 ## The optional input @var{labels} is a cell array of strings of the same
 ## length as @var{x} specifying the label for each slice.
 ##
-## If the first argument @var{hax} is an axis handle, then plot into these axes,
-## rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
-## The optional return value @var{h} is a list of graphics handles to the patch,
-## surface, and text objects generating the plot.
+## The optional return value @var{h} is a list of graphics handles to the
+## patch, surface, and text objects generating the plot.
 ##
 ## Note: If @code{sum (@var{x}) @leq{} 1} then the elements of @var{x} are
 ## interpreted as percentages directly and are not normalized by @code{sum (x)}.
--- a/scripts/plot/plot.m
+++ b/scripts/plot/plot.m
@@ -21,9 +21,9 @@
 ## @deftypefnx {Function File} {} plot (@var{x}, @var{y})
 ## @deftypefnx {Function File} {} plot (@var{x}, @var{y}, @var{property}, @var{value}, @dots{})
 ## @deftypefnx {Function File} {} plot (@var{x}, @var{y}, @var{fmt})
-## @deftypefnx {Function File} {} plot (@var{h}, @dots{})
+## @deftypefnx {Function File} {} plot (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} plot (@dots{})
-## Produce two-dimensional plots.
+## Produce 2-D plots.
 ##
 ## Many different combinations of arguments are possible.  The simplest
 ## form is
@@ -94,7 +94,7 @@
 ## @end itemize
 ##
 ## Multiple property-value pairs may be specified, but they must appear
-## in pairs.  These arguments are applied to the lines drawn by
+## in pairs.  These arguments are applied to the line objects drawn by
 ## @code{plot}.
 ##
 ## If the @var{fmt} argument is supplied, it is interpreted as
@@ -125,7 +125,7 @@
 ## @item ";title;"
 ## Here @code{"title"} is the label for the key.
 ##
-## @item +
+## @item  +
 ## @itemx *
 ## @itemx o
 ## @itemx x
@@ -170,13 +170,13 @@
 ## This will plot the cosine and sine functions and label them accordingly
 ## in the key.
 ##
-## If the first argument is an axis handle, then plot into these axes,
-## rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
-## The optional return value @var{h} is a graphics handle to the created plot.
+## The optional return value @var{h} is a vector of graphics handles to
+## the created line objects.
 ##
-## @seealso{semilogx, semilogy, loglog, polar, mesh, contour, bar,
-## stairs, errorbar, xlabel, ylabel, title, print}
+## @seealso{axis, box, grid, hold, legend, title, xlabel, ylabel, xlim, ylim, ezplot, errorbar, fplot, line, plot3, polar, loglog, semilogx, semilogy, subplot}
 ## @end deftypefn
 
 ## Author: jwe
--- a/scripts/plot/plot3.m
+++ b/scripts/plot/plot3.m
@@ -18,13 +18,13 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} plot3 (@var{x}, @var{y}, @var{z})
-## @deftypefnx {Function File} {} plot3 (@var{x}, @var{y}, @var{z}, @var{property}, @var{value}, @dots{})
+## @deftypefnx {Function File} {} plot3 (@var{x}, @var{y}, @var{z}, @var{prop}, @var{value}, @dots{})
 ## @deftypefnx {Function File} {} plot3 (@var{x}, @var{y}, @var{z}, @var{fmt})
 ## @deftypefnx {Function File} {} plot3 (@var{x}, @var{cplx})
 ## @deftypefnx {Function File} {} plot3 (@var{cplx})
 ## @deftypefnx {Function File} {} plot3 (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} plot3 (@dots{})
-## Produce three-dimensional plots.
+## Produce 3-D plots.
 ##
 ## Many different combinations of arguments are possible.  The simplest
 ## form is
@@ -81,12 +81,12 @@
 ## objects drawn by @code{plot3}.  If the @var{fmt} argument is supplied it
 ## will format the line objects in the same manner as @code{plot}.
 ##
-## If the first argument is an axis handle @var{hax}, then plot into these axes,
-## rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the created plot.
 ##
-## An example of the use of @code{plot3} is
+## Example:
 ##
 ## @example
 ## @group
@@ -209,7 +209,7 @@
             color = __next_line_color__ ();
           endif
 
-          htmp(++idx) = line (hax, x(:, i), y(:, i), z(:, i),
+          htmp(++idx) = line (x(:, i), y(:, i), z(:, i),
                               "color", color, "linestyle", linestyle,
                               "marker", marker, properties{:});
           key = options.key;
@@ -264,7 +264,7 @@
             color = __next_line_color__ ();
           endif
 
-          htmp(++idx) = line (hax, x(:, i), y(:, i), z(:, i),
+          htmp(++idx) = line (x(:, i), y(:, i), z(:, i),
                               "color", color, "linestyle", linestyle,
                               "marker", marker, properties{:});
           key = options.key;
@@ -339,7 +339,7 @@
           color = __next_line_color__ ();
         endif
 
-        htmp(++idx) = line (hax, x(:, i), y(:, i), z(:, i),
+        htmp(++idx) = line (x(:, i), y(:, i), z(:, i),
                             "color", color, "linestyle", linestyle,
                             "marker", marker, properties{:});
         key = options.key;
--- a/scripts/plot/plotmatrix.m
+++ b/scripts/plot/plotmatrix.m
@@ -22,9 +22,10 @@
 ## @deftypefnx {Function File} {} plotmatrix (@dots{}, @var{style})
 ## @deftypefnx {Function File} {} plotmatrix (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {[@var{h}, @var{ax}, @var{bigax}, @var{p}, @var{pax}] =} plotmatrix (@dots{})
-## Scatter plot of the columns of one matrix against another.  Given the
-## arguments @var{x} and @var{y}, that have a matching number of rows,
-## @code{plotmatrix} plots a set of axes corresponding to
+## Scatter plot of the columns of one matrix against another.
+##
+## Given the arguments @var{x} and @var{y}, that have a matching number of
+## rows, @code{plotmatrix} plots a set of axes corresponding to
 ##
 ## @example
 ## plot (@var{x}(:, i), @var{y}(:, j))
@@ -43,15 +44,15 @@
 ## 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} command.
 ##
-## If the first argument is an axis handle @var{hax}, then plot into these axes,
-## rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} provides handles to the individual
 ## graphics objects in the scatter plots, whereas @var{ax} returns the
 ## handles to the scatter plot axis objects.  @var{bigax} is a hidden
 ## axis object that surrounds the other axes, such that the commands
 ## @code{xlabel}, @code{title}, etc., will be associated with this hidden
-## axis.  Finally @var{p} returns the graphics objects associated with
+## axis.  Finally, @var{p} returns the graphics objects associated with
 ## the histogram and @var{pax} the corresponding axes objects.
 ##
 ## Example:
@@ -60,7 +61,7 @@
 ## plotmatrix (randn (100, 3), "g+")
 ## @end example
 ##
-## @seealso{plot}
+## @seealso{scatter, plot}
 ## @end deftypefn
 
 function [h, ax, bigax, p, pax] = plotmatrix (varargin)
@@ -108,8 +109,7 @@
 function plotmatrixdelete (h, d, ax)
   for i = 1 : numel (ax)
     hc = ax(i);
-    if (ishandle (hc) && strcmp (get (hc, "type"), "axes")
-        && strcmpi (get (hc, "beingdeleted"), "off"))
+    if (isaxes (hc) && strcmpi (get (hc, "beingdeleted"), "off"))
       parent = get (hc, "parent");
       ## If the parent is invalid or being deleted, then do nothing
       if (ishandle (parent) && strcmpi (get (parent, "beingdeleted"), "off"))
--- a/scripts/plot/plotyy.m
+++ b/scripts/plot/plotyy.m
@@ -20,25 +20,28 @@
 ## @deftypefn  {Function File} {} plotyy (@var{x1}, @var{y1}, @var{x2}, @var{y2})
 ## @deftypefnx {Function File} {} plotyy (@dots{}, @var{fun})
 ## @deftypefnx {Function File} {} plotyy (@dots{}, @var{fun1}, @var{fun2})
-## @deftypefnx {Function File} {} plotyy (@var{h}, @dots{})
+## @deftypefnx {Function File} {} plotyy (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {[@var{ax}, @var{h1}, @var{h2}] =} plotyy (@dots{})
-## Plot two sets of data with independent y-axes.  The arguments @var{x1} and
-## @var{y1} define the arguments for the first plot and @var{x1} and @var{y2}
-## for the second.
+## Plot two sets of data with independent y-axes.
+##
+## The arguments @var{x1} and @var{y1} define the arguments for the first plot
+## and @var{x1} and @var{y2} for the second.
 ##
 ## By default the arguments are evaluated with
 ## @code{feval (@@plot, @var{x}, @var{y})}.  However the type of plot can be
 ## modified with the @var{fun} argument, in which case the plots are
 ## generated by @code{feval (@var{fun}, @var{x}, @var{y})}.  @var{fun} can be
-## a function handle, an inline function or a string of a function name.
+## a function handle, an inline function, or a string of a function name.
 ##
 ## The function to use for each of the plots can be independently defined
 ## with @var{fun1} and @var{fun2}.
 ##
-## If given, @var{h} defines the principal axis in which to plot the @var{x1}
-## and @var{y1} data.  The return value @var{ax} is a two element vector with
-## the axis handles of the two plots.  @var{h1} and @var{h2} are handles to
-## the objects generated by the plot commands.
+## If the first argument @var{hax} is an axes handle, then it defines
+## the principal axis in which to plot the @var{x1} and @var{y1} data.
+##
+## The return value @var{ax} is a vector with the axis handles of the two
+## y axes.  @var{h1} and @var{h2} are handles to the objects generated by the
+## plot commands.
 ##
 ## @example
 ## @group
@@ -112,7 +115,7 @@
     [ax, h1, h2] = __plotyy__ (ax, varargin{:});
   unwind_protect_cleanup
     ## Only change back to the old axis if we didn't delete it
-    if (ishandle (oldh) && strcmp (get (oldh, "type"), "axes"))
+    if (isaxes (oldh))
       axes (oldh);
     endif
   end_unwind_protect
@@ -139,7 +142,7 @@
 
   xlim = [min([x1(:); x2(:)]), max([x1(:); x2(:)])];
 
-  if (ishandle (ax(1)) && strcmp (get (ax(1), "type"), "axes"))
+  if (isaxes (ax(1)))
     axes (ax(1));
   else
     ax(1) = axes ();
@@ -154,7 +157,7 @@
   cf = gcf ();
   set (cf, "nextplot", "add");
 
-  if (ishandle (ax(2)) && strcmp (get (ax(2), "type"), "axes"))
+  if (isaxes (ax(2)))
     axes (ax(2));
   else
     ax(2) = axes ();
@@ -286,7 +289,7 @@
 %! ylabel (hax(2), 'Right axis is Green');
 
 function deleteplotyy (h, d, ax2, t2)
-  if (ishandle (ax2) && strcmp (get (ax2, "type"), "axes")
+  if (isaxes (ax2)
       && (isempty (gcbf ()) || strcmp (get (gcbf (), "beingdeleted"),"off"))
       && strcmp (get (ax2, "beingdeleted"), "off"))
     set (t2, "deletefcn", []);
--- a/scripts/plot/polar.m
+++ b/scripts/plot/polar.m
@@ -31,8 +31,8 @@
 ## The optional argument @var{fmt} specifies the line format in the same way
 ## as @code{plot}.
 ##
-## If the first argument @var{hax} is an axis handle, then plot into this axis,
-## rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the created plot.
 ##
--- a/scripts/plot/print.m
+++ b/scripts/plot/print.m
@@ -21,17 +21,18 @@
 ## @deftypefnx {Function File} {} print (@var{options})
 ## @deftypefnx {Function File} {} print (@var{filename}, @var{options})
 ## @deftypefnx {Function File} {} print (@var{h}, @var{filename}, @var{options})
-## Print a plot, or save it to a file.  Both output formatted for 
-## printing (PDF and PostScript), and many bitmapped and vector
-## image formats are supported.
+## Print a plot, or save it to a file.
+##
+## Both output formatted for printing (PDF and PostScript), and many bitmapped
+## and vector image formats are supported.
 ##
 ## @var{filename} defines the name of the output file.  If the
 ## file name has no suffix, one is inferred from the specified
 ## device and appended to the file name.  If no filename is
 ## specified, the output is sent to the printer.
 ##
-## @var{h} specifies the figure handle.  If no handle is specified
-## the handle for the current figure is used.
+## @var{h} specifies the handle of the figure to print.  If no handle is
+## specified the current figure is used.
 ##
 ## For output to a printer, PostScript file, or PDF file,
 ## the paper size is specified by the figure's @code{papersize}
@@ -58,23 +59,23 @@
 ##   Specify the command for calling Ghostscript.  For Unix and Windows
 ## the defaults are 'gs' and 'gswin32c', respectively.
 ##
-## @item -color
+## @item  -color
 ## @itemx -mono
-##   Monochrome or color output.
+##   Color or monochrome output.
 ##
-## @item -solid
+## @item  -solid
 ## @itemx -dashed
 ##   Force all lines to be solid or dashed, respectively.
 ##
-## @item -portrait
+## @item  -portrait
 ## @itemx -landscape
 ##   Specify the orientation of the plot for printed output.  For
 ## non-printed output the aspect ratio of the output corresponds to
 ## the plot area defined by the "paperposition" property in the
-## orientation specified.  This options is equivalent to changing
+## orientation specified.  This option is equivalent to changing
 ## the figure's "paperorientation" property.
 ##
-## @item -TextAlphaBits=@var{n}
+## @item  -TextAlphaBits=@var{n}
 ## @itemx -GraphicsAlphaBits=@var{n}
 ##   Octave is able to produce output for various printers, bitmaps, and
 ## vector formats by using Ghostscript.
@@ -88,21 +89,21 @@
 ## and is one of:
 ##
 ##   @table @code
-##   @item ps
+##   @item  ps
 ##   @itemx ps2
 ##   @itemx psc
 ##   @itemx psc2
-##     Postscript (level 1 and 2, mono and color).  The FLTK graphics
-## toolkit generates Postscript level 3.0.
+##     PostScript (level 1 and 2, mono and color).  The FLTK graphics
+## toolkit generates PostScript level 3.0.
 ##
-##   @item eps
+##   @item  eps
 ##   @itemx eps2
 ##   @itemx epsc
 ##   @itemx epsc2
-##     Encapsulated postscript (level 1 and 2, mono and color).  The FLTK
-## graphic toolkit generates Postscript level 3.0.
+##     Encapsulated PostScript (level 1 and 2, mono and color).  The FLTK
+## graphic toolkit generates PostScript level 3.0.
 ##
-##   @item tex
+##   @item  tex
 ##   @itemx epslatex
 ##   @itemx epslatexstandalone
 ##   @itemx pstex
@@ -119,18 +120,18 @@
 ##     Generate a @LaTeX{} file using PGF/TikZ@.  For the FLTK toolkit
 ## the result is PGF.
 ##
-##   @item ill
+##   @item  ill
 ##   @itemx aifm
 ##     Adobe Illustrator (Obsolete for Gnuplot versions > 4.2)
 ##
-##   @item cdr
+##   @item  cdr
 ##   @itemx @nospell{corel}
 ##     CorelDraw
 ##
 ##   @item dxf
 ##     AutoCAD
 ##
-##   @item emf
+##   @item  emf
 ##   @itemx meta
 ##     Microsoft Enhanced Metafile
 ##
@@ -149,7 +150,7 @@
 ##   @item png
 ##     Portable network graphics
 ##
-##   @item jpg
+##   @item  jpg
 ##   @itemx jpeg
 ##     JPEG image
 ##
@@ -167,7 +168,7 @@
 ##   @end table
 ##
 ##   If the device is omitted, it is inferred from the file extension,
-## or if there is no filename it is sent to the printer as postscript.
+## or if there is no filename it is sent to the printer as PostScript.
 ##
 ## @item -d@var{ghostscript_device}
 ##   Additional devices are supported by Ghostscript.
@@ -199,7 +200,7 @@
 ##     Produces pdf output from eps
 ##   @end table
 ##
-##   For a complete list, type @samp{system ("gs -h")} to see what formats
+##   For a complete list, type @code{system ("gs -h")} to see what formats
 ## and devices are available.
 ##
 ##   When Ghostscript output is sent to a printer the size is determined
@@ -208,15 +209,16 @@
 ## the figure's "paperposition" property.
 ##
 ## @item -append
-##   Append Postscript or PDF output to a pre-existing file of the same type.
+##   Append PostScript or PDF output to a pre-existing file of the same type.
 ##
 ## @item -r@var{NUM}
 ##   Resolution of bitmaps in pixels per inch.  For both metafiles and
 ## SVG the default is the screen resolution; for other formats it is 150 dpi.
 ## To specify screen resolution, use "-r0".
 ##
-## @item -tight
-##   Force a tight bounding box for eps files.
+## @item  -loose
+## @itemx -tight
+##   Force a tight or loose bounding box for eps files.  The default is loose.
 ##
 ## @item -@var{preview}
 ##   Add a preview to eps files.  Supported formats are:
@@ -243,7 +245,7 @@
 ## of the print function you must quote the @var{xsize},@var{ysize}
 ## option.  For example, by writing @w{"-S640,480"}.
 ##
-## @item -F@var{fontname}
+## @item  -F@var{fontname}
 ## @itemx -F@var{fontname}:@var{size}
 ## @itemx -F:@var{size}
 ##   Use @var{fontname} and/or @var{fontsize} for all text.
@@ -267,14 +269,13 @@
 ##
 ## @example
 ## @group
-## figure (1);
 ## clf ();
 ## surf (peaks);
 ## print -dcdj550
 ## @end group
 ## @end example
 ##
-## @seealso{figure, orient, saveas}
+## @seealso{saveas, orient, figure}
 ## @end deftypefn
 
 function print (varargin)
--- a/scripts/plot/private/__actual_axis_position__.m
+++ b/scripts/plot/private/__actual_axis_position__.m
@@ -30,7 +30,7 @@
     axis_obj = get (h);
   elseif (isstruct (h))
     axis_obj = h;
-    h = axis_obj.__my_handle__;
+    h = axis_obj.__cbar_hax__;
   endif
 
   ## Get figure size in pixels
--- a/scripts/plot/private/__add_default_menu__.m
+++ b/scripts/plot/private/__add_default_menu__.m
@@ -19,48 +19,49 @@
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} __add_default_menu__ (@var{fig})
 ## Add default menu to figure.  All uimenu handles have
-## set their property "handlevisibility" to "off".
+## their "HandleVisibility" property set to "off".
 ## @end deftypefn
 
 ## Author: Kai Habel
 
 function __add_default_menu__ (fig)
 
-  if (isfigure (fig))
-    obj = findall (fig, "label", "&File", "tag", "__default_menu__");
-    if (length (obj) == 0)
-      __f = uimenu (fig, "label", "&File", "handlevisibility", "off", "tag", "__default_menu__");
-        sa = uimenu (__f, "label", "Save &As", "handlevisibility", "off",
-                          "callback", @save_cb);
-        sv = uimenu (__f, "label", "&Save", "handlevisibility", "off",
-                          "callback", @save_cb);
-        cl = uimenu (__f, "label", "&Close", "handlevisibility", "off",
-                          "callback", "close(gcf)");
-
-      __e = uimenu (fig, "label", "&Edit", "handlevisibility", "off");
-        gr = uimenu (__e, "label", "&Grid", "handlevisibility", "off",
-                          "callback", @grid_cb);
-        as = uimenu (__e, "label", "Auto&scale", "handlevisibility", "off",
-                          "callback", @autoscale_cb);
-        gm = uimenu (__e, "label", "GUI &Mode", "handlevisibility", "off");
-          gm2 = uimenu (gm, "label", "Pan+Zoom", "handlevisibility", "off",
-                            "callback", @guimode_cb);
-          gm3 = uimenu (gm, "label", "Rotate+Zoom", "handlevisibility", "off",
-                            "callback", @guimode_cb);
-          gmn = uimenu (gm, "label", "None", "handlevisibility", "off",
-                            "callback", @guimode_cb);
-      __h = uimenu (fig, "label", "&Help", "handlevisibility", "off");
-        ab = uimenu (__h, "label", "A&bout", "handlevisibility", "off", "enable", "off");
-    endif
-  else
-    error ("expecting figure handle", "handlevisibility", "off");
+  ## Only FLTK toolkit currently provides menubar
+  if (! strcmp (get (fig, "__graphics_toolkit__"), "fltk"))
+    return;
   endif
 
-endfunction
+  obj = findall (fig, "-depth", 1, "tag", "__default_menu__", "label", "&File");
+  if (isempty (obj))
+    ## FIXME: uimenu() will cause menubar to be displayed, even though property
+    ##        menubar remains set at "none".  So, forcibly turn menubar status
+    ##        on and then off to force figure to hide menubar.
+    menubar_state = get (fig, "menubar");
+    set (fig, "menubar", "figure");
+    drawnow ();
+
+    __f = uimenu (fig, "label", "&File", "handlevisibility", "off",
+                       "tag", "__default_menu__");
+      uimenu (__f, "label", "Save &As", "callback", @save_cb);
+      uimenu (__f, "label", "&Save", "callback", @save_cb);
+      uimenu (__f, "label", "&Close", "callback", "close (gcf)");
 
-function grid_cb (h, e)
-  grid;
-  drawnow; # should not be required
+    __e = uimenu (fig, "label", "&Edit", "handlevisibility", "off",
+                       "tag", "__default_menu__");
+      uimenu (__e, "label", "&Grid", "callback", @grid_cb);
+      uimenu (__e, "label", "Auto&scale", "callback", @autoscale_cb);
+      gm = uimenu (__e, "label", "GUI &Mode");
+        uimenu (gm, "label", "Pan+Zoom", "callback", @guimode_cb);
+        uimenu (gm, "label", "Rotate+Zoom", "callback", @guimode_cb);
+        uimenu (gm, "label", "None", "callback", @guimode_cb);
+
+    __h = uimenu (fig, "label", "&Help", "handlevisibility", "off",
+                       "tag", "__default_menu__");
+      uimenu (__h, "label", "A&bout", "enable", "off");
+
+    set (fig, "menubar", menubar_state);
+  endif
+
 endfunction
 
 function save_cb (h, e)
@@ -78,32 +79,37 @@
 endfunction
 
 function __save_as__ (caller)
-
-  [filename, filedir] = uiputfile ({"*.pdf;*.ps;*.gif;*.png;*.jpg","Supported Graphic Formats"},
-                                  "Save Figure",
-                                  pwd);
+  [filename, filedir] = uiputfile ({"*.pdf;*.ps;*.gif;*.png;*.jpg",
+                                    "Supported Graphic Formats"},
+                                   "Save Figure",
+                                   pwd);
   if (filename != 0)
-    fname = strcat (filedir, filesep, filename);
-    obj = findall ("label", "&Save");
-    if (length (obj) > 0)
+    fname = [filedir filesep() filename];
+    obj = findall (gcbf, "label", "&Save");
+    if (! isempty (obj))
       set (obj(1), "userdata", fname);
     endif
     saveas (caller, fname);
   endif
 endfunction
 
+function grid_cb (h, e)
+  grid;
+endfunction
+
 function autoscale_cb (h, e)
   axis ("auto");
-  drawnow; #should not be required
 endfunction
 
 function guimode_cb (h, e)
   lbl = get (h, "label");
-  if (strncmp (lbl, "Pan+Zoom", 8))
-    gui_mode ("2D");
-  elseif (strncmp (lbl, "Rotate+Zoom", 11))
-    gui_mode ("3D");
-  elseif (strncmp (lbl, "None", 4))
-    gui_mode ("None");
-  endif
+  switch (lbl)
+    case "Pan+Zoom"
+      gui_mode ("2D");
+    case "Rotate+Zoom"
+      gui_mode ("3D");
+    case "None"
+      gui_mode ("None");
+  endswitch
 endfunction
+
--- a/scripts/plot/private/__errplot__.m
+++ b/scripts/plot/private/__errplot__.m
@@ -198,8 +198,8 @@
     hlegend = [];
     fkids = get (gcf (), "children");
     for i = 1 : numel (fkids)
-      if (ishandle (fkids(i)) && strcmp (get (fkids(i), "type"), "axes")
-          && (strcmp (get (fkids(i), "tag"), "legend")))
+      if (   strcmp (get (fkids(i), "type"), "axes")
+          && strcmp (get (fkids(i), "tag"), "legend"))
         udata = get (fkids(i), "userdata");
         if (! isempty (intersect (udata.handle, gca ())))
           hlegend = fkids (i);
--- a/scripts/plot/private/__plt__.m
+++ b/scripts/plot/private/__plt__.m
@@ -39,11 +39,11 @@
     hlegend = [];
     fkids = get (gcf (), "children");
     for i = 1 : numel (fkids)
-      if (ishandle (fkids (i)) && strcmp (get (fkids (i), "type"), "axes")
-          && (strcmp (get (fkids (i), "tag"), "legend")))
-        udata = get (fkids (i), "userdata");
+      if (   strcmp (get (fkids(i), "type"), "axes")
+          && strcmp (get (fkids(i), "tag"), "legend"))
+        udata = get (fkids(i), "userdata");
         if (! isempty (intersect (udata.handle, gca ())))
-          hlegend = fkids (i);
+          hlegend = fkids(i);
           break;
         endif
       endif
--- a/scripts/plot/quiver.m
+++ b/scripts/plot/quiver.m
@@ -25,23 +25,23 @@
 ## @deftypefnx {Function File} {} quiver (@var{h}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} quiver (@dots{})
 ##
-## Plot the @code{(@var{u}, @var{v})} components of a vector field in
-## an @code{(@var{x}, @var{y})} meshgrid.  If the grid is uniform, you can
+## Plot the (@var{u}, @var{v}) components of a vector field in
+## an (@var{x}, @var{y}) meshgrid.  If the grid is uniform, you can
 ## specify @var{x} and @var{y} as vectors.
 ##
 ## If @var{x} and @var{y} are undefined they are assumed to be
-## @code{(1:@var{m}, 1:@var{n})} where @code{[@var{m}, @var{n}] =
-## size (@var{u})}.
+## @code{(1:@var{m}, 1:@var{n})} where
+## @code{[@var{m}, @var{n}] = size (@var{u})}.
 ##
 ## The variable @var{s} is a scalar defining a scaling factor to use for
 ## the arrows of the field relative to the mesh spacing.  A value of 0
 ## disables all scaling.  The default value is 1.
 ##
 ## The style to use for the plot can be defined with a line style @var{style}
-## in a similar manner to the line styles used with the @code{plot} command.
+## of the same format as 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 are drawn filled.
+## drawn rather than arrows.  If the argument "filled" is given then the
+## markers are 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{quiver3, feather, plot}
+## @seealso{quiver3, compass, feather, plot}
 ## @end deftypefn
 
 function retval = quiver (varargin)
--- a/scripts/plot/quiver3.m
+++ b/scripts/plot/quiver3.m
@@ -22,26 +22,26 @@
 ## @deftypefnx {Function File} {} quiver3 (@dots{}, @var{s})
 ## @deftypefnx {Function File} {} quiver3 (@dots{}, @var{style})
 ## @deftypefnx {Function File} {} quiver3 (@dots{}, "filled")
-## @deftypefnx {Function File} {} quiver3 (@var{h}, @dots{})
+## @deftypefnx {Function File} {} quiver3 (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} quiver3 (@dots{})
 ##
-## Plot the @code{(@var{u}, @var{v}, @var{w})} components of a vector field in
-## an @code{(@var{x}, @var{y}), @var{z}} meshgrid.  If the grid is uniform, you
-## can specify @var{x}, @var{y} @var{z} as vectors.
+## Plot the (@var{u}, @var{v}, @var{w}) components of a vector field in
+## an (@var{x}, @var{y}, @var{z}) meshgrid.  If the grid is uniform, you
+## can specify @var{x}, @var{y}, and @var{z} as vectors.
 ##
-## If @var{x}, @var{y} and @var{z} are undefined they are assumed to be
+## If @var{x}, @var{y}, and @var{z} are undefined they are assumed to be
 ## @code{(1:@var{m}, 1:@var{n}, 1:@var{p})} where @code{[@var{m}, @var{n}] =
 ## size (@var{u})} and @code{@var{p} = max (size (@var{w}))}.
 ##
 ## The variable @var{s} is a scalar defining a scaling factor to use for
-##  the arrows of the field relative to the mesh spacing.  A value of 0
+## the arrows of the field relative to the mesh spacing.  A value of 0
 ## disables all scaling.  The default value is 1.
 ##
 ## The style to use for the plot can be defined with a line style @var{style}
-## in a similar manner to the line styles used with the @code{plot} command.
+## of the same format as 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.
+## drawn rather than arrows.  If the argument "filled" is given then the
+## markers are 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,
@@ -58,7 +58,7 @@
 ## @end group
 ## @end example
 ##
-## @seealso{quiver, plot}
+## @seealso{quiver, compass, feather, plot}
 ## @end deftypefn
 
 function retval = quiver3 (varargin)
--- a/scripts/plot/rectangle.m
+++ b/scripts/plot/rectangle.m
@@ -22,12 +22,14 @@
 ## @deftypefnx {Function File} {} rectangle (@dots{}, "Curvature", @var{curv})
 ## @deftypefnx {Function File} {} rectangle (@dots{}, "EdgeColor", @var{ec})
 ## @deftypefnx {Function File} {} rectangle (@dots{}, "FaceColor", @var{fc})
+## @deftypefnx {Function File} {} rectangle (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} rectangle (@dots{})
 ##
-## Draw rectangular patch defined by @var{pos} and @var{curv}.  The variable
-## @code{@var{pos}(1:2)} defines the lower left-hand corner of the patch
-## and @code{@var{pos}(3:4)} defines its width and height.  By default, the
-## value of @var{pos} is @code{[0, 0, 1, 1]}.
+## Draw a rectangular patch defined by @var{pos} and @var{curv}.
+## 
+## The variable @code{@var{pos}(1:2)} defines the lower left-hand corner of
+## the patch and @code{@var{pos}(3:4)} defines its width and height.  By
+## default, the value of @var{pos} is @code{[0, 0, 1, 1]}.
 ##
 ## The variable @var{curv} defines the curvature of the sides of the rectangle
 ## and may be a scalar or two-element vector with values between 0 and 1.
@@ -44,12 +46,15 @@
 ## min (pos (1:2)) / max (pos (1:2)) * curv
 ## @end example
 ##
-## Other properties are passed to the underlying patch command. 
+## Additional property/value pairs are passed to the underlying patch command. 
 ## 
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
 ## The optional return value @var{h} is a graphics handle to the created
 ## rectangle object.
 ## @end deftypefn
-## @seealso{patch}
+## @seealso{patch, line, cylinder, ellipsoid, sphere}
 
 function h = rectangle (varargin)
 
@@ -59,8 +64,7 @@
   unwind_protect
     hax = newplot (hax);
 
-    htmp =  __rectangle__ (hax, varargin{:});
-
+    htmp = __rectangle__ (hax, varargin{:});
   unwind_protect_cleanup
     if (! isempty (oldfig))
       set (0, "currentfigure", oldfig);
@@ -208,9 +212,9 @@
 function update_props (h, d)
   kids = get (h, "children");
   set (kids, "edgecolor", get (h, "edgecolor"),
-       "linewidth", get (h, "linewidth"),
-       "linestyle", get (h, "linestyle"),
-       "facecolor", get (h, "facecolor"));
+             "linewidth", get (h, "linewidth"),
+             "linestyle", get (h, "linestyle"),
+             "facecolor", get (h, "facecolor"));
 endfunction
 
 
--- a/scripts/plot/refresh.m
+++ b/scripts/plot/refresh.m
@@ -19,9 +19,10 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} refresh ()
 ## @deftypefnx {Function File} {} refresh (@var{h})
-## Refresh a figure, forcing it to be redrawn.  When called without an
-## argument the current figure is redrawn.  Otherwise, the figure pointed
-## to by @var{h} is redrawn.
+## Refresh a figure, forcing it to be redrawn.
+##
+## When called without an argument the current figure is redrawn.  Otherwise,
+## the figure with graphic handle @var{h} is redrawn.
 ## @seealso{drawnow}
 ## @end deftypefn
 
--- a/scripts/plot/refreshdata.m
+++ b/scripts/plot/refreshdata.m
@@ -21,9 +21,12 @@
 ## @deftypefnx {Function File} {} refreshdata (@var{h})
 ## @deftypefnx {Function File} {} refreshdata (@var{h}, @var{workspace})
 ## Evaluate any @samp{datasource} properties of the current figure and update
-## the plot if the corresponding data has changed.  If called with one or more
-## arguments @var{h} is a scalar or array of figure handles to refresh.  The
-## optional second argument @var{workspace} can take the following values.
+## the plot if the corresponding data has changed.
+##
+## If the first argument @var{h} is a list of graphic handles, then operate
+## on these objects rather than the current figure returned by @code{gcf}.
+##
+## The optional second argument @var{workspace} can take the following values:
 ##
 ## @table @asis
 ## @item "base"
--- a/scripts/plot/ribbon.m
+++ b/scripts/plot/ribbon.m
@@ -28,11 +28,12 @@
 ## (default is 0.75).  If @var{x} is omitted, a vector containing the
 ## row numbers is assumed (@code{1:rows (Y)}).
 ##
-## If the first argument @var{hax} is an axis handle, then plot into this axis,
-## rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a vector of graphics handles to
 ## the surface objects representing each ribbon.
+## @seealso{surface, waterfall}
 ## @end deftypefn
 
 ## Author: Kai Habel <kai.habel at gmx.de>
@@ -113,7 +114,7 @@
 %! clf;
 %! colormap ('default');
 %! [x, y, z] = sombrero ();
-%! [x, y] = meshgrid (x, y);
+%! [~, y] = meshgrid (x, y);
 %! ribbon (y, z);
 
 %!FIXME: Could have some input validation tests here
--- a/scripts/plot/rose.m
+++ b/scripts/plot/rose.m
@@ -23,7 +23,6 @@
 ## @deftypefnx {Function File} {} rose (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} rose (@dots{})
 ## @deftypefnx {Function File} {[@var{thout} @var{rout}] =} rose (@dots{})
-##
 ## Plot an angular histogram.
 ##
 ## With one vector argument, @var{th}, plot the histogram with 20 angular bins.
@@ -32,9 +31,12 @@
 ##
 ## If @var{nbins} is given and is a scalar, then the histogram is produced with
 ## @var{nbin} bins.  If @var{bins} is a vector, then the center of each bin is
-## defined defined by the values of @var{bins} and the number of bins is
+## defined by the values of @var{bins} and the number of bins is
 ## given by the number of elements in @var{bins}.
 ##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
 ## The optional return value @var{h} is a vector of graphics handles to the
 ## line objects representing each histogram.
 ##
@@ -48,7 +50,7 @@
 ## @end group
 ## @end example
 ##
-## @seealso{polar, compass, hist}
+## @seealso{hist, polar}
 ## @end deftypefn
 
 function [thout, rout] = rose (varargin)
@@ -91,7 +93,7 @@
     oldfig = ifelse (isempty (hax), [], get (0, "currentfigure"));
     unwind_protect
       hax = newplot (hax);
-      htmp = polar (hax, th, r);
+      htmp = polar (th, r);
     unwind_protect_cleanup
       if (! isempty (oldfig))
         set (0, "currentfigure", oldfig);
--- a/scripts/plot/saveas.m
+++ b/scripts/plot/saveas.m
@@ -26,10 +26,10 @@
 ##
 ## @table @code
 ##   @item ps
-##     Postscript
+##     PostScript
 ##
 ##   @item eps
-##     Encapsulated Postscript
+##     Encapsulated PostScript
 ##
 ##   @item jpg
 ##     JPEG Image
@@ -46,7 +46,7 @@
 ##
 ## All device formats specified in @code{print} may also be used.  If
 ## @var{fmt} is omitted it is extracted from the extension of @var{filename}.
-## The default format is @code{"pdf"}.
+## The default format is "pdf".
 ##
 ## @example
 ## @group
@@ -56,7 +56,7 @@
 ## @end group
 ## @end example
 ##
-## @seealso{print}
+## @seealso{print, orient}
 ## @end deftypefn
 
 ## Author: Kai Habel
--- a/scripts/plot/scatter.m
+++ b/scripts/plot/scatter.m
@@ -20,28 +20,37 @@
 ## @deftypefn  {Function File} {} scatter (@var{x}, @var{y})
 ## @deftypefnx {Function File} {} scatter (@var{x}, @var{y}, @var{s})
 ## @deftypefnx {Function File} {} scatter (@var{x}, @var{y}, @var{s}, @var{c})
-## @deftypefnx {Function File} {} scatter (@var{x}, @var{y}, @var{s}, @var{c}, @var{style})
-## @deftypefnx {Function File} {} scatter (@var{x}, @var{y}, @var{s}, @var{c}, @var{prop}, @var{val})
+## @deftypefnx {Function File} {} scatter (@dots{}, @var{style})
 ## @deftypefnx {Function File} {} scatter (@dots{}, "filled")
-## @deftypefnx {Function File} {} scatter (@var{h}, @dots{})
+## @deftypefnx {Function File} {} scatter (@dots{}, @var{prop}, @var{val}, @dots{})
+## @deftypefnx {Function File} {} scatter (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} scatter (@dots{})
+## Draw a 2-D scatter plot.
 ##
-## 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 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.
+## A marker is plotted at each point defined by the coordinates in the vectors
+## @var{x} and  @var{y}.
+##
+## The size of the markers is determined by @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 a 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
+## 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 an @var{n}-by-3 matrix defining
-## the colors of each of the markers individually.
+## a scaled index into the current colormap; or an @nospell{Nx3} matrix defining
+## the RGB color of each marker individually.
 ##
 ## 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} command.
-## If the argument @code{"filled"} is given then the markers as filled.  All
-## additional arguments are passed to the underlying patch command.
+## If no marker is specified it defaults to 'o' or circles.
+## If the argument "filled" is given then the markers are filled.
+##
+## Additional property/value pairs are passed directly to the underlying
+## patch object.
+##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the created patch
 ## object.
@@ -56,7 +65,7 @@
 ## @end group
 ## @end example
 ##
-## @seealso{plot, patch, scatter3}
+## @seealso{scatter3, patch, plot}
 ## @end deftypefn
 
 function retval = scatter (varargin)
--- a/scripts/plot/scatter3.m
+++ b/scripts/plot/scatter3.m
@@ -17,29 +17,40 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} scatter3 (@var{x}, @var{y}, @var{z}, @var{s}, @var{c})
-## @deftypefnx {Function File} {} scatter3 (@dots{}, "filled")
+## @deftypefn  {Function File} {} scatter3 (@var{x}, @var{y}, @var{z})
+## @deftypefnx {Function File} {} scatter3 (@var{x}, @var{y}, @var{z}, @var{s})
+## @deftypefnx {Function File} {} scatter3 (@var{x}, @var{y}, @var{z}, @var{s}, @var{c})
 ## @deftypefnx {Function File} {} scatter3 (@dots{}, @var{style})
+## @deftypefnx {Function File} {} scatter3 (@dots{}, "filled")
 ## @deftypefnx {Function File} {} scatter3 (@dots{}, @var{prop}, @var{val})
-## @deftypefnx {Function File} {} scatter3 (@var{h}, @dots{})
+## @deftypefnx {Function File} {} scatter3 (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} scatter3 (@dots{})
+## Draw a 3-D scatter plot.
 ##
-## Plot a scatter plot of the data in 3D@.  A marker is plotted at each point
-## defined by the points in the vectors @var{x}, @var{y} and @var{z}.  The size
-## of the markers used is determined by @var{s}, which can be a scalar or
-## a vector of the same length of @var{x}, @var{y} and @var{z}.  If @var{s} is
-## not given or is an empty matrix, then the default value of 8 points is used.
+## A marker is plotted at each point defined by the coordinates in the vectors
+## @var{x}, @var{y}, and @var{z}.
+##
+## The size of the markers is determined by @var{s}, which can be a scalar
+## or a vector of the same length as @var{x}, @var{y}, and @var{z}.  If @var{s}
+## is not given, or is an empty matrix, then a 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
-## the colors of each of the markers individually.
+## a scaled index into the current colormap; or an @nospell{Nx3} matrix defining
+## the RGB color of each marker individually.
 ##
 ## 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} command.
-## If the argument "filled" is given then the markers as filled.  All
-## additional arguments are passed to the underlying patch command.
+## If no marker is specified it defaults to 'o' or circles.
+## If the argument "filled" is given then the markers are filled.
+##
+## Additional property/value pairs are passed directly to the underlying
+## patch object.
+##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the hggroup
 ## object representing the points.
@@ -51,7 +62,7 @@
 ## @end group
 ## @end example
 ##
-## @seealso{plot, patch, scatter}
+## @seealso{scatter, patch, plot}
 ## @end deftypefn
 
 function retval = scatter3 (varargin)
@@ -66,6 +77,11 @@
       hax = newplot (hax);
       
       tmp = __scatter__ (hax, 3, "scatter3", varargin{:});
+
+      if (! ishold (hax))
+        set (hax, "view", [-37.5, 30],
+                  "xgrid", "on", "ygrid", "on", "zgrid", "on");
+      endif
     unwind_protect_cleanup
       if (! isempty (oldfig))
         set (0, "currentfigure", oldfig);
@@ -73,11 +89,6 @@
     end_unwind_protect
   endif
 
-  if (! ishold (hax))
-    set (hax, "view", [-37.5, 30],
-         "xgrid", "on", "ygrid", "on", "zgrid", "on");
-  endif
-
   if (nargout > 0)
     retval = tmp;
   endif
--- a/scripts/plot/semilogx.m
+++ b/scripts/plot/semilogx.m
@@ -21,12 +21,16 @@
 ## @deftypefnx {Function File} {} semilogx (@var{x}, @var{y})
 ## @deftypefnx {Function File} {} semilogx (@var{x}, @var{y}, @var{property}, @var{value}, @dots{})
 ## @deftypefnx {Function File} {} semilogx (@var{x}, @var{y}, @var{fmt})
-## @deftypefnx {Function File} {} semilogx (@var{h}, @dots{})
+## @deftypefnx {Function File} {} semilogx (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} semilogx (@dots{})
-## Produce a two-dimensional plot using a logarithmic scale for the @var{x}
-## axis.  See the documentation of @code{plot} for a description of the
+## Produce a 2-D plot using a logarithmic scale for the x-axis.
+##
+## See the documentation of @code{plot} for a description of the
 ## arguments that @code{semilogx} will accept.
 ## 
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
 ## The optional return value @var{h} is a graphics handle to the created plot.
 ## @seealso{plot, semilogy, loglog}
 ## @end deftypefn
--- a/scripts/plot/semilogxerr.m
+++ b/scripts/plot/semilogxerr.m
@@ -18,9 +18,10 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} semilogxerr (@var{args})
+## @deftypefnx {Function File} {} semilogxerr (@var{hax}, @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.
+## Produce 2-D plots using a logarithmic scale for the x-axis and
+## errorbars at each data point.
 ##
 ## Many different combinations of arguments are possible.  The most common
 ## form is
@@ -32,8 +33,8 @@
 ## @noindent
 ## which produces a semi-logarithmic plot of @var{y} versus @var{x}
 ## with errors in the @var{y}-scale defined by @var{ey} and the plot
-## format defined by @var{fmt}.  See @code{errorbar} for available formats and
-## additional information.
+## format defined by @var{fmt}.  @xref{XREFerrorbar,,errorbar}, for available
+## formats and additional information.
 ## @seealso{errorbar, semilogyerr, loglogerr}
 ## @end deftypefn
 
@@ -53,6 +54,7 @@
     if (! ishold (hax))
       set (hax, "xminortick", "on");
     endif
+
     htmp = __errcomm__ ("semilogxerr", hax, varargin{:});
 
   unwind_protect_cleanup
--- a/scripts/plot/semilogy.m
+++ b/scripts/plot/semilogy.m
@@ -23,10 +23,14 @@
 ## @deftypefnx {Function File} {} semilogy (@var{x}, @var{y}, @var{fmt})
 ## @deftypefnx {Function File} {} semilogy (@var{h}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} semilogy (@dots{})
-## Produce a two-dimensional plot using a logarithmic scale for the @var{y}
-## axis.  See the documentation of @code{plot} for a description of the
+## Produce a 2-D plot using a logarithmic scale for the y-axis.
+##
+## See the documentation of @code{plot} for a description of the
 ## arguments that @code{semilogy} will accept.
 ##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
 ## The optional return value @var{h} is a graphics handle to the created plot.
 ## @seealso{plot, semilogx, loglog}
 ## @end deftypefn
@@ -52,16 +56,16 @@
 
     htmp = __plt__ ("semilogy", hax, varargin{:});
 
-    if (nargout > 0)
-      h = htmp;
-    endif
-
   unwind_protect_cleanup
     if (! isempty (oldfig))
       set (0, "currentfigure", oldfig);
     endif
   end_unwind_protect
 
+  if (nargout > 0)
+    h = htmp;
+  endif
+
 endfunction
 
 
--- a/scripts/plot/semilogyerr.m
+++ b/scripts/plot/semilogyerr.m
@@ -18,9 +18,10 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} semilogyerr (@var{args})
+## @deftypefnx {Function File} {} semilogyerr (@var{hax}, @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.
+## Produce 2-D plots using a logarithmic scale for the y-axis and
+## errorbars at each data point.
 ##
 ## Many different combinations of arguments are possible.  The most common
 ## form is
@@ -32,8 +33,8 @@
 ## @noindent
 ## which produces a semi-logarithmic plot of @var{y} versus @var{x}
 ## with errors in the @var{y}-scale defined by @var{ey} and the plot
-## format defined by @var{fmt}.  See @code{errorbar} for available formats and
-## additional information.
+## format defined by @var{fmt}.  @xref{XREFerrorbar,,errorbar}, for available
+## formats and additional information.
 ## @seealso{errorbar, semilogxerr, loglogerr}
 ## @end deftypefn
 
@@ -53,6 +54,7 @@
     if (! ishold (hax))
       set (hax, "yminortick", "on");
     endif
+
     htmp = __errcomm__ ("semilogyerr", hax, varargin{:});
 
   unwind_protect_cleanup
--- a/scripts/plot/shading.m
+++ b/scripts/plot/shading.m
@@ -18,9 +18,10 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} shading (@var{type})
-## @deftypefnx {Function File} {} shading (@var{ax}, @var{type})
-## Set the shading of surface or patch graphic objects.  Valid arguments
-## for @var{type} are
+## @deftypefnx {Function File} {} shading (@var{hax}, @var{type})
+## Set the shading of patch or surface graphic objects.
+##
+## Valid arguments for @var{type} are
 ##
 ## @table @asis
 ## @item "flat"
@@ -34,8 +35,9 @@
 ## invisible.
 ## @end table
 ##
-## If @var{hax} is given the shading is applied to axis @var{hax} instead
-## of the current axis.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+## @seealso{fill, mesh, patch, pcolor, surf, surface, hidden}
 ## @end deftypefn
 
 ## Author: Kai Habel <kai.habel@gmx.de>
@@ -54,20 +56,41 @@
     hax = gca ();
   endif
 
-  hp = findobj (hax, "type", "patch");
-  hs = findobj (hax, "type", "surface");
-  hall = [hp(:); hs(:)];
+  ## Find all patch and surface objects that are descendants of hax
+  ## and  which are not part of a contour plot hggroup.
+  hlist = [];
+  kids = get (hax, "children");
+  while (! isempty (kids))
+    types = get (kids, "type");
+    hlist = [hlist; kids(strcmp(types, "patch"))];
+    hlist = [hlist; kids(strcmp(types, "surface"))];
+    parents = kids(strcmp (types, "axes"));
+    hglist = kids(strcmp (types, "hggroup"));
+    for i = 1 : numel (hglist)
+      props = get (hglist(i));
+      if (! isfield (props, "levelstep"))
+        parents(end+1) = hglist(i); 
+      endif
+    endfor
+    kids = get (parents, "children");
+  endwhile
+
+  ## FIXME: This is the old, simple code.
+  ##        Unfortunately, it also shades contour plots which is not desirable.
+  ##hp = findobj (hax, "type", "patch");
+  ##hs = findobj (hax, "type", "surface");
+  ##hlist = [hp(:); hs(:)];
 
   switch (lower (mode))
     case "flat"
-      set (hall, "facecolor", "flat");
-      set (hall, "edgecolor", "none");
+      set (hlist, "facecolor", "flat");
+      set (hlist, "edgecolor", "none");
     case "interp"
-      set (hall, "facecolor", "interp");
-      set (hall, "edgecolor", "none");
+      set (hlist, "facecolor", "interp");
+      set (hlist, "edgecolor", "none");
     case "faceted"
-      set (hall, "facecolor", "flat");
-      set (hall, "edgecolor", [0 0 0]);
+      set (hlist, "facecolor", "flat");
+      set (hlist, "edgecolor", [0 0 0]);
     otherwise
       error ('shading: Invalid MODE "%s"', mode);
   endswitch
--- a/scripts/plot/shg.m
+++ b/scripts/plot/shg.m
@@ -18,8 +18,9 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Command} {} shg
-## Show the graph window.  Currently, this is the same as executing
-## @code{drawnow}.
+## Show the graph window.
+##
+## Currently, this is the same as executing @code{drawnow}.
 ## @seealso{drawnow, figure}
 ## @end deftypefn
 
--- a/scripts/plot/shrinkfaces.m
+++ b/scripts/plot/shrinkfaces.m
@@ -106,7 +106,7 @@
 
   n = columns (vertices);
   if (n < 2 || n > 3)
-    error ("shrinkfaces: only 2D and 3D patches are supported");
+    error ("shrinkfaces: only 2-D and 3-D patches are supported");
   endif
 
   m = columns (faces);
--- a/scripts/plot/slice.m
+++ b/scripts/plot/slice.m
@@ -26,15 +26,14 @@
 ## @deftypefnx {Function File} {@var{h} =} slice (@dots{})
 ## Plot slices of 3-D data/scalar fields.
 ##
-## Each element of the 3-dimensional
-## array @var{v} represents a scalar value at a location given by the
-## parameters @var{x}, @var{y}, and @var{z}.  The parameters @var{x},
-## @var{x}, and @var{z} are either 3-dimensional arrays of the same size
-## as the array @var{v} in the "meshgrid" format or vectors.  The
-## parameters @var{xi}, etc. respect a similar format to @var{x}, etc.,
-## and they represent the points at which the array @var{vi} is
-## interpolated using interp3.  The vectors @var{sx}, @var{sy}, and
-## @var{sz} contain points of orthogonal slices of the respective axes.
+## Each element of the 3-dimensional array @var{v} represents a scalar value at
+## a location given by the parameters @var{x}, @var{y}, and @var{z}.  The
+## parameters @var{x}, @var{x}, and @var{z} are either 3-dimensional arrays of
+## the same size as the array @var{v} in the "meshgrid" format or vectors.  The
+## parameters @var{xi}, etc. respect a similar format to @var{x}, etc., and
+## they represent the points at which the array @var{vi} is interpolated using
+## interp3.  The vectors @var{sx}, @var{sy}, and @var{sz} contain points of
+## orthogonal slices of the respective axes.
 ##
 ## If @var{x}, @var{y}, @var{z} are omitted, they are assumed to be
 ## @code{x = 1:size (@var{v}, 2)}, @code{y = 1:size (@var{v}, 1)} and
@@ -59,8 +58,8 @@
 ##
 ## The default method is "linear".
 ##
-## If the first argument @var{hax} is an axis handle, then plot into this axis,
-## rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the created
 ## surface object.
@@ -161,8 +160,8 @@
           [xi, yi, zi] = meshgrid (squeeze (x(1,:,1)), sy(i), squeeze (z(1,1,:)));
           vy = squeeze (interp3 (x, y, z, v, xi, yi, zi, method));
           htmp(sidx++) = surface (squeeze (xi),
-                                 squeeze (sy(i) * ones (size (zi))),
-                                 squeeze (zi), vy);
+                                  squeeze (sy(i) * ones (size (zi))),
+                                  squeeze (zi), vy);
         endfor
       endif
 
@@ -171,7 +170,7 @@
           [xi, yi, zi] = meshgrid (sx(i), squeeze (y(:,1,1)), squeeze (z(1,1,:)));
           vx = squeeze (interp3 (x, y, z, v, xi, yi, zi, method));
           htmp(sidx++) = surface (squeeze (sx(i) * ones (size (zi))),
-                                 squeeze (yi), squeeze(zi), vx);
+                                  squeeze (yi), squeeze(zi), vx);
         endfor
       endif
     else
--- a/scripts/plot/sombrero.m
+++ b/scripts/plot/sombrero.m
@@ -19,15 +19,32 @@
 ## -*- texinfo -*-
 ## @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.
+## @deftypefnx {Function File} {@var{z} =} sombrero (@dots{})
+## @deftypefnx {Function File} {[@var{x}, @var{y}, @var{z}] =} sombrero (@dots{})
+## Plot the familiar 3-D sombrero function.
 ##
 ## The function plotted is
+## @tex
+## $$z = { \rm{sin} (\sqrt {(x^2 + y^2)}) \over \sqrt {(x^2 + y^2)} }$$
+## @end tex
+## @ifnottex
 ##
 ## @example
 ## z = sin (sqrt (x^2 + y^2)) / (sqrt (x^2 + y^2))
 ## @end example
-## @seealso{surf, meshgrid, mesh}
+##
+## @end ifnottex
+## Called without a return argument, @code{sombrero} plots the surface of the
+## above function over the meshgrid [-8,8] using @code{surf}.
+## 
+## If @var{n} is a scalar the plot is made with @var{n} grid lines.
+## The default value for @var{n} is 41.
+##
+## When called with output arguments, return the data for the function
+## evaluated over the meshgrid.  This can subsequently be plotted with
+## @code{surf (@var{x}, @var{y}, @var{z})}.
+##
+## @seealso{peaks, meshgrid, mesh, surf}
 ## @end deftypefn
 
 ## Author: jwe
@@ -43,11 +60,13 @@
   tx = linspace (-8, 8, n)';
   ty = tx;
   [xx, yy] = meshgrid (tx, ty);
-  r = sqrt (xx .^ 2 + yy .^ 2) + eps;
+  r = sqrt (xx .^ 2 + yy .^ 2) + eps;  # eps prevents div/0 errors
   tz = sin (r) ./ r;
+
   if (nargout == 0)
     surf (tx, ty, tz);
-    box ("off");
+  elseif (nargout == 1)
+    x = tz;
   else
     x = tx;
     y = ty;
--- a/scripts/plot/specular.m
+++ b/scripts/plot/specular.m
@@ -21,13 +21,14 @@
 ## @deftypefnx {Function File} {} specular (@var{sx}, @var{sy}, @var{sz}, @var{lv}, @var{vv}, @var{se})
 ## Calculate specular reflection strength of a surface defined by the normal
 ## vector elements @var{sx}, @var{sy}, @var{sz} using Phong's approximation.
-## The light and view vectors can be specified using parameter @var{lv} and
-## @var{vv} respectively.
-## Both can be given as 2-element vectors [azimuth, elevation] in degrees or as
-## 3-element
-## vector [x, y, z].  An optional 6th argument describes the specular exponent
-## (spread) @var{se}.
-## @seealso{surfl, diffuse}
+##
+## The light source location and viewer location vectors can be specified using
+## parameter @var{lv} and  @var{vv} respectively.  The location vectors can
+## given as 2-element vectors [azimuth, elevation] in degrees or as 3-element
+## vectors [x, y, z].
+##
+## An optional sixth argument describes the specular exponent (spread) @var{se}.
+## @seealso{diffuse, surfl}
 ## @end deftypefn
 
 ## Author: Kai Habel <kai.habel@gmx.de>
--- a/scripts/plot/sphere.m
+++ b/scripts/plot/sphere.m
@@ -17,17 +17,33 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {[@var{x}, @var{y}, @var{z}] =} sphere (@var{n})
-## @deftypefnx {Function File} {} sphere (@var{h}, @dots{})
-## Generate three matrices in @code{meshgrid} format, such that
-## @code{surf (@var{x}, @var{y}, @var{z})} generates a unit sphere.
-## The matrices of @code{@var{n}+1}-by-@code{@var{n}+1}.  If @var{n} is
-## omitted then a default value of 20 is assumed.
+## @deftypefn  {Function File} {} sphere ()
+## @deftypefnx {Function File} {} sphere (@var{n})
+## @deftypefnx {Function File} {} sphere (@var{hax}, @dots{})
+## @deftypefnx {Function File} {[@var{x}, @var{y}, @var{z}] =} sphere (@dots{})
+## Plot a 3-D unit sphere.
+##
+## The optional input @var{n} determines the number of faces around the
+## the circumference of the sphere.  The default value is 20.
+##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
-## Called with no return arguments, @code{sphere} call directly
-## @code{surf (@var{x}, @var{y}, @var{z})}.  If an axes handle is passed
-## as the first argument, the surface is plotted to this set of axes.
-## @seealso{peaks}
+## If outputs are requested @code{sphere} returns three matrices in
+## @code{meshgrid} format such that @code{surf (@var{x}, @var{y}, @var{z})}
+## generates a unit sphere.
+##
+## Example:
+##
+## @example
+## @group
+## [x, y, z] = sphere (40);
+## surf (3*x, 3*y, 3*z);
+## axis equal;
+## title ("sphere of radius 3");
+## @end group
+## @end example
+## @seealso{cylinder, ellipsoid, rectangle}
 ## @end deftypefn
 
 function [xx, yy, zz] = sphere (varargin)
@@ -59,8 +75,7 @@
     unwind_protect
       hax = newplot (hax);
     
-      surf (hax, x, y, z);
-      
+      surf (x, y, z);
     unwind_protect_cleanup
       if (! isempty (oldfig))
         set (0, "currentfigure", oldfig);
--- a/scripts/plot/stairs.m
+++ b/scripts/plot/stairs.m
@@ -20,7 +20,7 @@
 ## @deftypefn  {Function File} {} stairs (@var{y})
 ## @deftypefnx {Function File} {} stairs (@var{x}, @var{y})
 ## @deftypefnx {Function File} {} stairs (@dots{}, @var{style})
-## @deftypefnx {Function File} {} stairs (@dots{}, @var{prop}, @var{val})
+## @deftypefnx {Function File} {} stairs (@dots{}, @var{prop}, @var{val}, @dots{})
 ## @deftypefnx {Function File} {} stairs (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} stairs (@dots{})
 ## @deftypefnx {Function File} {[@var{xstep}, @var{ystep}] =} stairs (@dots{})
@@ -31,7 +31,7 @@
 ## and the X coordinates are taken to be the indices of the elements.
 ## 
 ## The style to use for the plot can be defined with a line style @var{style}
-## in the same way as the @code{plot} command.
+## of the same format as the @code{plot} command.
 ##
 ## Multiple property/value pairs may be specified, but they must appear in
 ## pairs.
@@ -59,7 +59,7 @@
 ##
 ## @noindent
 ## are equivalent.
-## @seealso{plot}
+## @seealso{bar, hist, plot, stem}
 ## @end deftypefn
 
 ## Author: jwe
@@ -164,8 +164,8 @@
 
   if (doplot)
     h = [];
+    hold_state = get (gca (), "nextplot");
     unwind_protect
-      hold_state = get (gca (), "nextplot");
       for i = 1 : columns (y)
         hg = hggroup ();
         h = [h; hg];
--- a/scripts/plot/stem.m
+++ b/scripts/plot/stem.m
@@ -21,10 +21,10 @@
 ## @deftypefnx {Function File} {} stem (@var{x}, @var{y})
 ## @deftypefnx {Function File} {} stem (@dots{}, @var{linespec})
 ## @deftypefnx {Function File} {} stem (@dots{}, "filled")
-## @deftypefnx {Function File} {} stem (@dots{}, "@var{prop}", "@var{val}", @dots{})
+## @deftypefnx {Function File} {} stem (@dots{}, @var{prop}, @var{val}, @dots{})
 ## @deftypefnx {Function File} {} stem (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} stem (@dots{})
-## Plot a stem graph from two vectors of x-y data.
+## Plot a 2-D stem graph.
 ##
 ## If only one argument is given, it is taken as the y-values and the
 ## x-coordinates are taken from the indices of the elements.
@@ -37,7 +37,8 @@
 ## The default color is @code{"b"} (blue), the default line style is
 ## @code{"-"}, and the default marker is @code{"o"}.  The line style can
 ## be altered by the @code{linespec} argument in the same manner as the
-## @code{plot} command.  For example,
+## @code{plot} command.  If the "filled" argument is present the markers at
+## the top of the stems will be filled in.  For example,
 ##
 ## @example
 ## @group
@@ -50,11 +51,11 @@
 ## @noindent
 ## plots 10 stems with heights from 2 to 20 in red;
 ##
-## Multiple property/value pairs may be specified, but they must appear in
-## pairs.
+## Optional property/value pairs may be specified to control the appearance
+## of the plot.
 ##
-## If the first argument @var{hax} is an axis handle, then plot into these axes,
-## rather than the current axis handle returned by @code{gca}.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a vector of "stem series" graphics
 ## handles with one handle per column of the variable @var{y}.  The
@@ -75,7 +76,7 @@
 ## @noindent
 ## changes the color of the second "stem series" and moves the base line
 ## of the first.
-## @seealso{stem3, bar, hist, plot}
+## @seealso{stem3, bar, hist, plot, stairs}
 ## @end deftypefn
 
 ## Author: Michel D. Schmid <michaelschmid@users.sourceforge.net>
--- a/scripts/plot/stem3.m
+++ b/scripts/plot/stem3.m
@@ -18,33 +18,36 @@
 
 ## -*- texinfo -*-
 ## @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} {} stem3 (@dots{}, @var{linespec})
 ## @deftypefnx {Function File} {} stem3 (@dots{}, "filled")
-## @deftypefnx {Function File} {} stem3 (@dots{}, "@var{prop}", "@var{val}", @dots{})
+## @deftypefnx {Function File} {} stem3 (@dots{}, @var{prop}, @var{val}, @dots{})
 ## @deftypefnx {Function File} {} stem3 (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} stem3 (@dots{})
 ## Plot a 3-D stem graph.
 ##
-## The default color is @code{"r"} (red), the default line style is
-## @code{"-"}, and the default marker is @code{"o"}.  The line style can
-## be altered by the @code{linespec} argument in the same manner as the
-## @code{plot} command.
+## Stems are drawn from the height @var{z} to the location in the x-y plane
+## determined by @var{x} and @var{y}.  The default color is @code{"b"} (blue),
+## the default line style is @code{"-"}, and the default marker is @code{"o"}.
 ##
-## Multiple property/value pairs may be specified, but they must appear in
-## pairs.
+## The line style can be altered by the @code{linespec} argument in the same
+## manner as the @code{plot} command.  If the "filled" argument is present
+## the markers at the top of the stems will be filled in.
 ##
-## If the first argument @var{hax} is an axis handle, then plot into these axes,
-## rather than the current axis handle returned by @code{gca}.
+## Optional property/value pairs may be specified to control the appearance
+## of the plot.
+##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a vector with the handles of the line
-## and marker objects used to draw the stems as "stem series" object.
+## and marker objects used to draw the stems as a "stem series" object.
 ##
 ## Example:
 ##
 ## @example
 ## @group
 ## theta = 0:0.2:6;
-## stem3 (cos (theta), sin (theta), theta)
+## stem3 (cos (theta), sin (theta), theta);
 ## @end group
 ## @end example
 ##
@@ -52,7 +55,6 @@
 ## plots 31 stems with heights from 0 to 6 lying on a circle.
 ##
 ## Implementation Note: Color definitions with RGB-triples are not valid.
-##
 ## @seealso{stem, bar, hist, plot}
 ## @end deftypefn
 
--- a/scripts/plot/struct2hdl.m
+++ b/scripts/plot/struct2hdl.m
@@ -18,18 +18,18 @@
 ## @deftypefn  {Function File} {@var{h} =} struct2hdl (@var{s})
 ## @deftypefnx {Function File} {@var{h} =} struct2hdl (@var{s}, @var{p})
 ## @deftypefnx {Function File} {@var{h} =} struct2hdl (@var{s}, @var{p}, @var{hilev})
-## Construct a handle object @var{h} from the structure @var{s}.  The structure
-## must contain the fields "handle", "type", "children", "properties", and
-## "special".  If the handle of an existing figure or axes is specified,
-## @var{p}, the new object will be created as a child of that object.
-## If no object handle is provided then a new figure and the necessary
-## children will be constructed using the default object values from
-## the root figure.
+## Construct a graphics handle object @var{h} from the structure @var{s}.
+##
+## The structure must contain the fields "handle", "type", "children",
+## "properties", and "special".  If the handle of an existing figure or axes
+## is specified, @var{p}, the new object will be created as a child of that
+## object.  If no parent handle is provided then a new figure and the necessary
+## children will be constructed using the default values from the root figure.
 ##
 ## A third boolean argument @var{hilev} can be passed to specify whether
-## the function should try to preserve listeners/callbacks, e.g., for
-## legends or hggroups.  The default is false.
-## @seealso{hdl2struct, findobj, get, set}
+## the function should preserve listeners/callbacks, e.g., for legends or
+## hggroups.  The default is false.
+## @seealso{hdl2struct, findobj}
 ## @end deftypefn
 
 ## Author: pdiribarne <pdiribarne@new-host.home>
--- a/scripts/plot/subplot.m
+++ b/scripts/plot/subplot.m
@@ -19,18 +19,17 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} subplot (@var{rows}, @var{cols}, @var{index})
 ## @deftypefnx {Function File} {} subplot (@var{rcn})
+## @deftypefnx {Function File} {} subplot (@dots{}, "align")
 ## @deftypefnx {Function File} {@var{hax} =} subplot (@dots{})
-## Set up a plot grid with @var{rows} by @var{cols} subwindows and plot
-## in location given by @var{index}.
+## @deftypefnx {Function File} {@var{hax} =} subplot (@dots{})
+## Set up a plot grid with @var{rows} by @var{cols} subwindows and set the
+## current axes for plotting to the location given by @var{index}.
 ##
-## If @var{hax} is provided, subplot returns the axis handle for the subplot.
-## This is usuful for modifying the properties of a subplot.
+## If only one numeric argument is supplied, then it must be a three digit
+## value specifying the location in digits 1 (rows) and 2 (columns) and the
+## plot index in digit 3.
 ##
-## If only one argument is supplied, then it must be a three digit value
-## specifying the location in digits 1 (rows) and 2 (columns) and the plot
-## index in digit 3.
-##
-## The plot index runs row-wise.  First all the columns in a row are filled
+## The plot index runs row-wise.  First all the columns in a row are numbered
 ## and then the next row is filled.
 ##
 ## For example, a plot with 2 by 3 grid will have plot indices running as
@@ -56,14 +55,20 @@
 ## @end group
 ## @end example
 ##
-## @var{index} may be a vector.  In which case, the new axis will enclose
+## @end ifnottex
+##
+## @var{index} may also be a vector.  In this case, the new axis will enclose
 ## the grid locations specified.  The first demo illustrates an example:
 ##
 ## @example
 ## demo ("subplot", 1)
 ## @end example
 ##
-## @end ifnottex
+## If the option "align" is given then the plot boxes of the subwindows
+## will align, but this may leave no room for axis tick marks or labels.
+##
+## If the output @var{hax} is requested, subplot returns the axis handle for
+## the subplot.  This is useful for modifying the properties of a subplot.
 ## @seealso{axes, plot}
 ## @end deftypefn
 
--- a/scripts/plot/surf.m
+++ b/scripts/plot/surf.m
@@ -20,22 +20,40 @@
 ## @deftypefn  {Function File} {} surf (@var{x}, @var{y}, @var{z})
 ## @deftypefnx {Function File} {} surf (@var{z})
 ## @deftypefnx {Function File} {} surf (@dots{}, @var{c})
+## @deftypefnx {Function File} {} surf (@dots{}, @var{prop}, @var{val}, @dots{})
 ## @deftypefnx {Function File} {} surf (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} surf (@dots{})
-## Plot a surface given matrices @var{x}, and @var{y} from @code{meshgrid} and
-## a matrix @var{z} corresponding to the @var{x} and @var{y} coordinates of
-## the mesh.  If @var{x} and @var{y} are vectors, then a typical vertex
-## is (@var{x}(j), @var{y}(i), @var{z}(i,j)).  Thus, columns of @var{z}
-## correspond to different @var{x} values and rows of @var{z} correspond
-## to different @var{y} values.
+## Plot a 3-D surface mesh.
+##
+## The surface mesh is plotted using shaded rectangles.  The vertices of the
+## rectangles [@var{x}, @var{y}] are typically the output of @code{meshgrid}.
+## over a 2-D rectangular region in the x-y plane.  @var{z} determines the
+## height above the plane of each vertex.  If only a single @var{z} matrix is
+## given, then it is plotted over the meshgrid
+## @code{@var{x} = 1:columns (@var{z}), @var{y} = 1:rows (@var{z})}.
+## Thus, columns of @var{z} correspond to different @var{x} values and rows
+## of @var{z} correspond to different @var{y} values.  
 ##
-## The color of the surface is derived from the @code{colormap} and
-## the value of @var{z}.  Optionally the color of the surface can be
-## specified independent of @var{z}, by adding a fourth matrix, @var{c}.
+## The color of the surface is computed by linearly scaling the @var{Z} values
+## to fit the range of the current colormap.  Use @code{caxis} and/or
+## change the colormap to control the appearance.
+##
+## Optionally, the color of the surface can be specified independently of
+## @var{z} by supplying a color matrix, @var{c}.
+##
+## Any property/value pairs are passed directly to the underlying surface
+## object.
+##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the created
 ## surface object.
-## @seealso{colormap, contour, meshgrid, mesh}
+##
+## Note: The exact appearance of the surface can be controlled with the
+## @code{shading} command or by using @code{set} to control surface object
+## properties.
+## @seealso{ezsurf, surfc, surfl, surfnorm, trisurf, contour, mesh, surface, meshgrid, hidden, shading, colormap, caxis}
 ## @end deftypefn
 
 ## Author: Kai Habel <kai.habel@gmx.de>
@@ -52,8 +70,9 @@
 
     if (! ishold (hax))
       set (hax, "view", [-37.5, 30],
-           "xgrid", "on", "ygrid", "on", "zgrid", "on");
+                "xgrid", "on", "ygrid", "on", "zgrid", "on");
     endif
+
   unwind_protect_cleanup
     if (! isempty (oldfig))
       set (0, "currentfigure", oldfig);
@@ -70,13 +89,13 @@
 %!demo
 %! clf;
 %! colormap ('default');
-%! [~,~,Z] = peaks ();
+%! Z = peaks ();
 %! surf (Z);
 
 %!demo
 %! clf;
 %! colormap ('default');
-%! [~,~,Z] = sombrero ();
+%! Z = sombrero ();
 %! [Fx,Fy] = gradient (Z);
 %! surf (Z, Fx+Fy);
 %! shading interp;
--- a/scripts/plot/surface.m
+++ b/scripts/plot/surface.m
@@ -21,19 +21,25 @@
 ## @deftypefnx {Function File} {} surface (@var{x}, @var{y}, @var{z})
 ## @deftypefnx {Function File} {} surface (@var{z}, @var{c})
 ## @deftypefnx {Function File} {} surface (@var{z})
-## @deftypefnx {Function File} {} surface (@dots{}, @var{prop}, @var{val})
-## @deftypefnx {Function File} {} surface (@var{h}, @dots{})
+## @deftypefnx {Function File} {} surface (@dots{}, @var{prop}, @var{val}, @dots{})
+## @deftypefnx {Function File} {} surface (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} surface (@dots{})
-## Plot a surface graphic object given matrices @var{x}, and @var{y} from
-## @code{meshgrid} and a matrix @var{z} corresponding to the @var{x} and
-## @var{y} coordinates of the surface.  If @var{x} and @var{y} are vectors,
-## then a typical vertex is (@var{x}(j), @var{y}(i), @var{z}(i,j)).  Thus,
-## columns of @var{z} correspond to different @var{x} values and rows of
-## @var{z} correspond to different @var{y} values.  If @var{x} and @var{y}
-## are missing, they are constructed from size of the matrix @var{z}.
+## Create a surface graphic object given matrices @var{x} and @var{y} from
+## @code{meshgrid} and a matrix of values @var{z} corresponding to the
+## @var{x} and @var{y} coordinates of the surface.
 ##
-## Any additional properties passed are assigned to the surface.
+## If @var{x} and @var{y} are vectors, then a typical vertex is
+## (@var{x}(j), @var{y}(i), @var{z}(i,j)).  Thus, columns of @var{z} correspond
+## to different @var{x} values and rows of @var{z} correspond to different
+## @var{y} values.  If only a single input @var{z} is given then @var{x} is
+## taken to be @code{1:rows (@var{z})} and @var{y} is
+## @code{1:columns (@var{z})}.
+##
+## Any property/value input pairs are assigned to the surface object.
 ## 
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
 ## The optional return value @var{h} is a graphics handle to the created
 ## surface object.
 ## @seealso{surf, mesh, patch, line}
--- a/scripts/plot/surfc.m
+++ b/scripts/plot/surfc.m
@@ -17,14 +17,43 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} surfc (@var{x}, @var{y}, @var{z})
-## Plot a surface and contour given matrices @var{x}, and @var{y} from
-## @code{meshgrid} and a matrix @var{z} corresponding to the @var{x} and
-## @var{y} coordinates of the mesh.  If @var{x} and @var{y} are vectors,
-## then a typical vertex is (@var{x}(j), @var{y}(i), @var{z}(i,j)).  Thus,
-## columns of @var{z} correspond to different @var{x} values and rows of
-## @var{z} correspond to different @var{y} values.
-## @seealso{ezsurfc, meshgrid, surf, contour}
+## @deftypefn  {Function File} {} surfc (@var{x}, @var{y}, @var{z})
+## @deftypefnx {Function File} {} surfc (@var{z})
+## @deftypefnx {Function File} {} surfc (@dots{}, @var{c})
+## @deftypefnx {Function File} {} surfc (@dots{}, @var{prop}, @var{val}, @dots{})
+## @deftypefnx {Function File} {} surfc (@var{hax}, @dots{})
+## @deftypefnx {Function File} {@var{h} =} surfc (@dots{})
+## Plot a 3-D surface mesh with underlying contour lines.
+##
+## The surface mesh is plotted using shaded rectangles.  The vertices of the
+## rectangles [@var{x}, @var{y}] are typically the output of @code{meshgrid}.
+## over a 2-D rectangular region in the x-y plane.  @var{z} determines the
+## height above the plane of each vertex.  If only a single @var{z} matrix is
+## given, then it is plotted over the meshgrid
+## @code{@var{x} = 1:columns (@var{z}), @var{y} = 1:rows (@var{z})}.
+## Thus, columns of @var{z} correspond to different @var{x} values and rows
+## of @var{z} correspond to different @var{y} values.  
+##
+## The color of the surface is computed by linearly scaling the @var{Z} values
+## to fit the range of the current colormap.  Use @code{caxis} and/or
+## change the colormap to control the appearance.
+##
+## Optionally, the color of the surface can be specified independently of
+## @var{z} by supplying a color matrix, @var{c}.
+##
+## Any property/value pairs are passed directly to the underlying surface
+## object.
+##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
+## The optional return value @var{h} is a graphics handle to the created
+## surface object.
+##
+## Note: The exact appearance of the surface can be controlled with the
+## @code{shading} command or by using @code{set} to control surface object
+## properties.
+## @seealso{ezsurfc, surf, surfl, surfnorm, trisurf, contour, mesh, surface, meshgrid, hidden, shading, colormap, caxis}
 ## @end deftypefn
 
 function h = surfc (varargin)
@@ -39,10 +68,9 @@
   unwind_protect
     hax = newplot (hax);
     
-    htmp = surface (hax, varargin{:});
+    htmp = surface (varargin{:});
 
     set (htmp, "facecolor", "flat");
-
     if (! ishold ())
       set (hax, "view", [-37.5, 30],
                 "xgrid", "on", "ygrid", "on", "zgrid", "on");
@@ -84,13 +112,13 @@
 %!demo
 %! clf;
 %! colormap ('default');
-%! [~,~,Z] = peaks ();
+%! Z = peaks ();
 %! surfc (Z);
 
 %!demo
 %! clf;
 %! colormap ('default');
-%! [~,~,Z] = sombrero ();
+%! Z = sombrero ();
 %! [Fx,Fy] = gradient (Z);
 %! surfc (Z, Fx+Fy);
 %! shading interp;
--- a/scripts/plot/surfl.m
+++ b/scripts/plot/surfl.m
@@ -22,20 +22,32 @@
 ## @deftypefnx {Function File} {} surfl (@var{x}, @var{y}, @var{z}, @var{L})
 ## @deftypefnx {Function File} {} surfl (@var{x}, @var{y}, @var{z}, @var{L}, @var{P})
 ## @deftypefnx {Function File} {} surfl (@dots{}, "light")
-## Plot a lighted surface given matrices @var{x}, and @var{y} from
-## @code{meshgrid} and a matrix @var{z} corresponding to the @var{x} and
-## @var{y} coordinates of the mesh.  If @var{x} and @var{y} are vectors, then
-## a typical vertex is (@var{x}(j), @var{y}(i), @var{z}(i,j)).  Thus, columns
-## of @var{z} correspond to different @var{x} values and rows of @var{z}
-## correspond to different @var{y} values.
+## @deftypefnx {Function File} {} surfl (@var{hax}, @dots{})
+## @deftypefnx {Function File} {@var{h} =} surfl (@dots{})
+##
+## Plot a 3-D surface using shading based on various lighting models.
 ##
-## The light direction can be specified using @var{L}.  It can be given as a
-## 2-element vector [azimuth, elevation] in degrees or as a 3-element vector
-## [lx, ly, lz].  The default value is rotated 45 degrees counterclockwise
-## from the current view.
+## The surface mesh is plotted using shaded rectangles.  The vertices of the
+## rectangles [@var{x}, @var{y}] are typically the output of @code{meshgrid}.
+## over a 2-D rectangular region in the x-y plane.  @var{z} determines the
+## height above the plane of each vertex.  If only a single @var{z} matrix is
+## given, then it is plotted over the meshgrid
+## @code{@var{x} = 1:columns (@var{z}), @var{y} = 1:rows (@var{z})}.
+## Thus, columns of @var{z} correspond to different @var{x} values and rows
+## of @var{z} correspond to different @var{y} values.  
 ##
-## The material properties of the surface can specified using a 4-element vector
-## @var{P} = [@var{AM} @var{D} @var{SP} @var{exp}] which defaults to
+## The default lighting mode "cdata", changes the cdata property of the
+## surface object to give the impression of a lighted surface.
+## @strong{Warning:} The alternative mode "light" mode which creates a light
+## object to illuminate the surface is not implemented (yet).
+##
+## The light source location can be specified using @var{L}.  It can be given
+## as a 2-element vector [azimuth, elevation] in degrees, or as a 3-element
+## vector [lx, ly, lz].  The default value is rotated 45 degrees
+## counterclockwise to the current view.
+##
+## The material properties of the surface can specified using a 4-element
+## vector @var{P} = [@var{AM} @var{D} @var{SP} @var{exp}] which defaults to
 ## @var{p} = [0.55 0.6 0.4 10].
 ##
 ## @table @asis
@@ -48,10 +60,11 @@
 ## @item "EXP" specular exponent
 ## @end table
 ##
-## The default lighting mode "cdata", changes the cdata property to give the
-## impression of a lighted surface.  Please note: the alternative "light"
-## mode, which creates a light object to illuminate the surface is not
-## implemented (yet).
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
+##
+## The optional return value @var{h} is a graphics handle to the created
+## surface object.
 ##
 ## Example:
 ##
@@ -62,82 +75,87 @@
 ## shading interp;
 ## @end group
 ## @end example
-## @seealso{surf, diffuse, specular, surface}
+## @seealso{diffuse, specular, surf, shading, colormap, caxis}
 ## @end deftypefn
 
 ## Author: Kai Habel <kai.habel@gmx.de>
 
-function retval = surfl (varargin)
+function h = surfl (varargin)
+
+  [hax, varargin, nargin] = __plt_get_axis_arg__ ("surfl", varargin{:});
+
+  if (nargin == 0)
+    print_usage ();
+  endif
+
+  ## Check for lighting type.
+  use_cdata = true;
+  if (ischar (varargin{end}))
+    switch (tolower (varargin{end}))
+      case "light"
+        warning ("light method not supported (yet), using cdata method instead");
+        ## This can be implemented when light objects are supported.
+        use_cdata = false;
+      case "cdata"
+        use_cdata = true;
+      otherwise
+        error ("surfl: unknown lighting method");
+    endswitch
+    varargin(end) = [];
+  endif
 
-  [hax, varargin] = __plt_get_axis_arg__ ("surfl", varargin{:});
+  ## Check for reflection properties argument.
+  ##
+  ## r = [ambient light strength,
+  ##      diffuse reflection strength,
+  ##      specular reflection strength,
+  ##      specular shine]
+  if (isnumeric (varargin{end}) && length (varargin{end}) == 4)
+    r = varargin{end};
+    varargin(end) = [];
+  else
+    ## Default values.
+    r = [0.55, 0.6, 0.4, 10];
+  endif
+
+  ## Check for light vector (lv) argument.
+  have_lv = false;
+  if (isnumeric (varargin{end}))
+    len = numel (varargin{end});
+    lastarg = varargin{end};
+    if (len == 3)
+      lv = lastarg;
+      varargin(end) = [];
+      have_lv = true;
+    elseif (len == 2)
+      [lv(1), lv(2), lv(3)] = sph2cart ((lastarg(1) - 90) * pi/180, 
+                                         lastarg(2) * pi/180,
+                                         1.0);
+      varargin(end) = [];
+      have_lv = true;
+    endif
+  endif
 
   oldfig = ifelse (isempty (hax), [], get (0, "currentfigure"));
   unwind_protect
     hax = newplot (hax);
 
-    ## Check for lighting type.
-    use_cdata = true;
-    if (ischar (varargin{end}))
-      lstr = tolower (varargin{end});
-      if (strncmp (lstr, "light", 5))
-        warning ("light method not supported (yet), using cdata method instead");
-        ## This can be implemented when light objects are supported.
-        use_cdata = false;
-      elseif (strncmp (lstr, "cdata", 5))
-        use_cdata = true;
-      else
-        error ("surfl: unknown lighting method");
-      endif
-      varargin(end) = [];
-    endif
-
-    ## Check for reflection properties argument.
-    ##
-    ## r = [ambient light strength,
-    ##      diffuse reflection strength,
-    ##      specular reflection strength,
-    ##      specular shine]
-    if (length (varargin{end}) == 4 && isnumeric (varargin{end}))
-      r = varargin{end};
-      varargin(end) = [];
-    else
-      ## Default values.
-      r = [0.55, 0.6, 0.4, 10];
-    endif
-
-    ## Check for light vector (lv) argument.
-    have_lv = false;
-    if (isnumeric (varargin{end}))
-      len = numel (varargin{end});
-      lastarg = varargin{end};
-      if (len == 3)
-        lv = lastarg;
-        varargin(end) = [];
-        have_lv = true;
-      elseif (len == 2)
-        [lv(1), lv(2), lv(3)] = sph2cart ((lastarg(1) - 90) * pi/180, lastarg(2) * pi/180, 1.0);
-        varargin(end) = [];
-        have_lv = true;
-      endif
-    endif
-
-    htmp = surface ([varargin, "parent", hax]{:});
+    htmp = surface (varargin{:});
     if (! ishold (hax))
       set (hax, "view", [-37.5, 30],
-           "xgrid", "on", "ygrid", "on", "zgrid", "on", "clim", [0 1]);
+                "xgrid", "on", "ygrid", "on", "zgrid", "on", "clim", [0 1]);
     endif
 
     ## Get view vector (vv).
-    a = axis;
-    [az, el] = view;
+    [az, el] = view ();
     vv = sph2cart ((az - 90) * pi/180.0, el * pi/180.0, 1.0);
 
-    if (!have_lv)
+    if (! have_lv)
       ## Calculate light vector (lv) from view vector.
       Phi = 45.0 / 180.0 * pi;
       R = [cos(Phi), -sin(Phi), 0;
            sin(Phi),  cos(Phi), 0;
-           0,          0,         1];
+           0,         0,        1];
       lv = (R * vv.').';
     endif
 
@@ -152,7 +170,7 @@
     [nr, nc] = size (get (htmp, "zdata"));
 
     ## Ambient, diffuse, and specular term.
-    cdata = (r(1) * ones (nr, nc)
+    cdata = (  r(1) * ones (nr, nc)
              + r(2) * diffuse  (vn(:,:,1), vn(:,:,2), vn(:,:,3), lv)
              + r(3) * specular (vn(:,:,1), vn(:,:,2), vn(:,:,3), lv, vv, r(4)));
 
@@ -165,7 +183,7 @@
   end_unwind_protect
 
   if (nargout > 0)
-    retval = htmp;
+    h = htmp;
   endif
 
 endfunction
@@ -177,6 +195,7 @@
 %! colormap (copper (64));
 %! surfl (X,Y,Z);
 %! shading interp;
+%! title ('surfl with defaults');
 
 %!demo
 %! clf;
@@ -185,4 +204,5 @@
 %! [az, el] = view ();
 %! surfl (X,Y,Z, [az+225,el], [0.2 0.6 0.4 25]);
 %! shading interp;
+%! title ('surfl with lighting vector and material properties');
 
--- a/scripts/plot/surfnorm.m
+++ b/scripts/plot/surfnorm.m
@@ -118,7 +118,7 @@
    unwind_protect
      hax = newplot (hax);
      
-     surf (hax, x, y, z, varargin{ioff:end});
+     surf (x, y, z, varargin{ioff:end});
      old_hold_state = get (hax, "nextplot");
      unwind_protect
        set (hax, "nextplot", "add");
--- a/scripts/plot/tetramesh.m
+++ b/scripts/plot/tetramesh.m
@@ -21,9 +21,9 @@
 ## @deftypefnx {Function File} {} tetramesh (@var{T}, @var{X}, @var{C})
 ## @deftypefnx {Function File} {} tetramesh (@dots{}, @var{property}, @var{val}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} tetramesh (@dots{})
+## Display the tetrahedrons defined in the m-by-4 matrix @var{T} as 3-D patches.
 ##
-## Display the tetrahedrons defined in the m-by-4 matrix @var{T}
-## as 3-D patches.  @var{T} is typically the output of a Delaunay triangulation
+## @var{T} is typically the output of a Delaunay triangulation
 ## of a 3-D set of points.  Every row of @var{T} contains four indices into
 ## the n-by-3 matrix @var{X} of the vertices of a tetrahedron.  Every row in
 ## @var{X} represents one point in 3-D space. 
@@ -43,7 +43,7 @@
 ## property "on" or "off".
 ##
 ## Type @code{demo tetramesh} to see examples on using @code{tetramesh}.
-## @seealso{delaunay3, delaunayn, trimesh, patch}
+## @seealso{trimesh, delaunay3, delaunayn, patch}
 ## @end deftypefn
 
 ## Author: Martin Helm <martin@mhelm.de>
--- a/scripts/plot/text.m
+++ b/scripts/plot/text.m
@@ -17,17 +17,19 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} text (@var{x}, @var{y}, @var{label})
-## @deftypefnx {Function File} {} text (@var{x}, @var{y}, @var{z}, @var{label})
-## @deftypefnx {Function File} {} text (@var{x}, @var{y}, @var{label}, @var{p1}, @var{v1}, @dots{})
-## @deftypefnx {Function File} {} text (@var{x}, @var{y}, @var{z}, @var{label}, @var{p1}, @var{v1}, @dots{})
+## @deftypefn  {Function File} {} text (@var{x}, @var{y}, @var{string})
+## @deftypefnx {Function File} {} text (@var{x}, @var{y}, @var{z}, @var{string})
+## @deftypefnx {Function File} {} text (@dots{}, @var{prop}, @var{val}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} text (@dots{})
-## Create a text object with text @var{label} at position @var{x},
-## @var{y}, @var{z} on the current axes.  Property-value pairs following
-## @var{label} may be used to specify the appearance of the text.
+## Create a text object with text @var{string} at position @var{x},
+## @var{y}, @var{z} on the current axes.
+##
+## Optional property/value pairs following may be used to specify the
+## appearance of the text.
 ##
 ## The optional return value @var{h} is a graphics handle to the created text
 ## object.
+## @seealso{gtext, title, xlabel, ylabel, zlabel}
 ## @end deftypefn
 
 ## Author: jwe
--- a/scripts/plot/title.m
+++ b/scripts/plot/title.m
@@ -18,16 +18,16 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} title (@var{string})
-## @deftypefnx {Function File} {} title (@var{string}, @var{property}, @var{val}, @dots{})
-## @deftypefnx {Function File} {} title (@var{hax}, @var{string})
-## @deftypefnx {Function File} {} title (@var{hax}, @var{string}, @var{property}, @var{val}, @dots{})
+## @deftypefnx {Function File} {} title (@var{string}, @var{prop}, @var{val}, @dots{})
+## @deftypefnx {Function File} {} title (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} title (@dots{})
 ## Specify the string used as a title for the current axis.
 ##
-## If @var{hax} is specified then title the axis defined by @var{hax}.
+## An optional list of @var{property}/@var{value} pairs can be used to change
+## the appearance of the created title text object.
 ##
-## An optional list of @var{property}/@var{value} pairs can be used to change
-## the properties of the created title text.
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the created text
 ## object.
--- a/scripts/plot/trimesh.m
+++ b/scripts/plot/trimesh.m
@@ -17,15 +17,35 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} trimesh (@var{tri}, @var{x}, @var{y}, @var{z})
+## @deftypefn  {Function File} {} trimesh (@var{tri}, @var{x}, @var{y}, @var{z}, @var{c})
+## @deftypefnx {Function File} {} trimesh (@var{tri}, @var{x}, @var{y}, @var{z})
+## @deftypefnx {Function File} {} trimesh (@var{tri}, @var{x}, @var{y})
+## @deftypefnx {Function File} {} trimesh (@dots{}, @var{prop}, @var{val}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} trimesh (@dots{})
-## Plot a triangular mesh in 3D@.  The variable @var{tri} is the triangular
-## meshing of the points @code{(@var{x}, @var{y})} which is returned
-## from @code{delaunay}.  The variable @var{z} is value at the point
-## @code{(@var{x}, @var{y})}.
+## Plot a 3-D triangular wireframe mesh.
+## 
+## In contrast to @code{mesh}, which plots a mesh using rectangles,
+## @code{trimesh} plots the mesh using triangles.
 ##
-## The optional return value @var{h} is a graphics handle to the created plot.
-## @seealso{triplot, trisurf, delaunay3}
+## @var{tri} is typically the output of a Delaunay triangulation over the
+## grid of @var{x}, @var{y}.  Every row of @var{tri} represents one triangle
+## and contains three indices into [@var{x}, @var{y}] which are the
+## vertices of the triangles in the x-y plane.  @var{z} determines the
+## height above the plane of each vertex.  If no @var{z} input is given then
+## the triangles are plotted as a 2-D figure.
+## 
+## The color of the trimesh is computed by linearly scaling the @var{z} values
+## to fit the range of the current colormap.  Use @code{caxis} and/or
+## change the colormap to control the appearance.
+##
+## Optionally, the color of the mesh can be specified independently of @var{z}
+## by supplying a color matrix, @var{c}.
+##
+## Any property/value pairs are passed directly to the underlying patch object.
+##
+## The optional return value @var{h} is a graphics handle to the created patch
+## object.
+## @seealso{mesh, tetramesh, triplot, trisurf, delaunay, patch, hidden}
 ## @end deftypefn
 
 function h = trimesh (tri, x, y, z, varargin)
@@ -39,13 +59,13 @@
   elseif (ischar (z))
     triplot (tri, x, y, z, varargin{:});
   else
-    newplot ();
+    hax = newplot ();
     handle = patch ("Vertices", [x(:), y(:), z(:)], "Faces", tri,
                     "FaceColor", "none", "EdgeColor", __next_line_color__ (),
                     varargin{:});
     if (! ishold ())
-      set (gca (), "view", [-37.5, 30],
-           "xgrid", "on", "ygrid", "on", "zgrid", "on");
+      set (hax, "view", [-37.5, 30],
+                "xgrid", "on", "ygrid", "on", "zgrid", "on");
     endif
     if (nargout > 0)
       h = handle;
--- a/scripts/plot/triplot.m
+++ b/scripts/plot/triplot.m
@@ -20,12 +20,18 @@
 ## @deftypefn  {Function File} {} triplot (@var{tri}, @var{x}, @var{y})
 ## @deftypefnx {Function File} {} triplot (@var{tri}, @var{x}, @var{y}, @var{linespec})
 ## @deftypefnx {Function File} {@var{h} =} triplot (@dots{})
-## Plot a triangular mesh in 2D@.  The variable @var{tri} is the triangular
-## meshing of the points @code{(@var{x}, @var{y})} which is returned from
-## @code{delaunay}.  If given, @var{linespec} determines the properties
-## to use for the lines. 
+## Plot a 2-D triangular mesh.
+## 
+## @var{tri} is typically the output of a Delaunay triangulation over the
+## grid of @var{x}, @var{y}.  Every row of @var{tri} represents one triangle
+## and contains three indices into [@var{x}, @var{y}] which are the
+## vertices of the triangles in the x-y plane.
 ##
-## The optional return value @var{h} is a graphics handle to the created plot.
+## The linestyle to use for the plot can be defined with the argument
+## @var{linespec} of the same format as the @code{plot} command.
+##
+## The optional return value @var{h} is a graphics handle to the created
+## patch object.
 ## @seealso{plot, trimesh, trisurf, delaunay}
 ## @end deftypefn
 
--- a/scripts/plot/trisurf.m
+++ b/scripts/plot/trisurf.m
@@ -17,15 +17,33 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} trisurf (@var{tri}, @var{x}, @var{y}, @var{z})
+## @deftypefn  {Function File} {} trisurf (@var{tri}, @var{x}, @var{y}, @var{z}, @var{c})
+## @deftypefnx {Function File} {} trisurf (@var{tri}, @var{x}, @var{y}, @var{z})
+## @deftypefnx {Function File} {} trisurf (@dots{}, @var{prop}, @var{val}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} trisurf (@dots{})
-## Plot a triangular surface in 3D@.  The variable @var{tri} is the triangular
-## meshing of the points @code{(@var{x}, @var{y})} which is returned
-## from @code{delaunay}.  The variable @var{z} is value at the point
-## @code{(@var{x}, @var{y})}.
+## Plot a 3-D triangular surface.
+## 
+## In contrast to @code{surf}, which plots a surface mesh using rectangles,
+## @code{trisurf} plots the mesh using triangles.
 ##
-## The optional return value @var{h} is a graphics handle to the created plot.
-## @seealso{triplot, trimesh, delaunay3}
+## @var{tri} is typically the output of a Delaunay triangulation over the
+## grid of @var{x}, @var{y}.  Every row of @var{tri} represents one triangle
+## and contains three indices into [@var{x}, @var{y}] which are the
+## vertices of the triangles in the x-y plane.  @var{z} determines the
+## height above the plane of each vertex.
+## 
+## The color of the trimesh is computed by linearly scaling the @var{z} values
+## to fit the range of the current colormap.  Use @code{caxis} and/or
+## change the colormap to control the appearance.
+##
+## Optionally, the color of the mesh can be specified independently of @var{z}
+## by supplying a color matrix, @var{c}.
+##
+## Any property/value pairs are passed directly to the underlying patch object.
+##
+## The optional return value @var{h} is a graphics handle to the created patch
+## object.
+## @seealso{surf, triplot, trimesh, delaunay, patch, shading}
 ## @end deftypefn
 
 function h = trisurf (tri, x, y, z, varargin)
@@ -55,17 +73,17 @@
         && strcmpi (varargin{nfc+1}, "interp"))
       varargin(end+(1:2)) = {"EdgeColor", "none"};
     endif
-    newplot ();
-    handle = patch ("Faces", tri, "Vertices", [x(:), y(:), z(:)],
-                    "FaceVertexCData", reshape (c, numel (c), 1),
-                    varargin{:});
+    hax = newplot ();
+    htmp = patch ("Faces", tri, "Vertices", [x(:), y(:), z(:)],
+                  "FaceVertexCData", reshape (c, numel (c), 1),
+                  varargin{:});
     if (nargout > 0)
-      h = handle;
+      h = htmp;
     endif
 
     if (! ishold ())
-      set (gca (), "view", [-37.5, 30],
-           "xgrid", "on", "ygrid", "on", "zgrid", "on");
+      set (hax, "view", [-37.5, 30],
+                "xgrid", "on", "ygrid", "on", "zgrid", "on");
     endif
   endif
 
--- a/scripts/plot/uimenu.m
+++ b/scripts/plot/uimenu.m
@@ -101,8 +101,7 @@
 %! uimenu (e, 'label', 'Toggle &Grid', 'accelerator', 'g', 'callback', 'grid (gca)');
 
 %!testif HAVE_FLTK
-%! toolkit = graphics_toolkit ();
-%! graphics_toolkit ("fltk");
+%! toolkit = graphics_toolkit ("fltk");
 %! hf = figure ("visible", "off");
 %! unwind_protect
 %!   ui = uimenu ("label", "mylabel");
@@ -119,8 +118,7 @@
 
 %% check for top level menus file, edit, and help
 %!testif HAVE_FLTK
-%! toolkit = graphics_toolkit ();
-%! graphics_toolkit ("fltk");
+%! toolkit = graphics_toolkit ("fltk");
 %! hf = figure ("visible", "off");
 %! unwind_protect
 %!   uif = findall (hf, "label", "&file");
@@ -135,8 +133,7 @@
 %! end_unwind_protect
 
 %!testif HAVE_FLTK
-%! toolkit = graphics_toolkit ();
-%! graphics_toolkit ("fltk");
+%! toolkit = graphics_toolkit ("fltk");
 %! hf = figure ("visible", "off");
 %! unwind_protect
 %!   uie = findall (hf, "label", "&edit");
--- a/scripts/plot/view.m
+++ b/scripts/plot/view.m
@@ -17,24 +17,29 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {[@var{azimuth}, @var{elevation}] =} view ()
-## @deftypefnx {Function File} {} view (@var{azimuth}, @var{elevation})
+## @deftypefn  {Function File} {} view (@var{azimuth}, @var{elevation})
 ## @deftypefnx {Function File} {} view ([@var{azimuth} @var{elevation}])
 ## @deftypefnx {Function File} {} view ([@var{x} @var{y} @var{z}])
 ## @deftypefnx {Function File} {} view (2)
 ## @deftypefnx {Function File} {} view (3)
-## @deftypefnx {Function File} {} view (@var{ax}, @dots{})
-## Query or set the viewpoint for the current axes.  The parameters
-## @var{azimuth} and @var{elevation} can be given as two arguments or as
-## 2-element vector.
-## The viewpoint can also be given with Cartesian coordinates @var{x},
-## @var{y}, and @var{z}.
+## @deftypefnx {Function File} {} view (@var{hax}, @dots{})
+## @deftypefnx {Function File} {[@var{azimuth}, @var{elevation}] =} view ()
+## Query or set the viewpoint for the current axes.
+##
+## The parameters @var{azimuth} and @var{elevation} can be given as two
+## arguments or as 2-element vector.  The viewpoint can also be specified with
+## Cartesian coordinates @var{x}, @var{y}, and @var{z}.
+##
 ## The call @code{view (2)} sets the viewpoint to @var{azimuth} = 0
 ## and @var{elevation} = 90, which is the default for 2-D graphs.
+##
 ## The call @code{view (3)} sets the viewpoint to @var{azimuth} = -37.5
 ## and @var{elevation} = 30, which is the default for 3-D graphs.
-## If @var{ax} is given, the viewpoint is set for this axes, otherwise
-## it is set for the current axes.
+##
+## If the first argument @var{hax} is an axes handle, then operate on
+## this axis rather than the current axes returned by @code{gca}.
+##
+## If no inputs are given, return the current @var{azimuth} and @var{elevation}.
 ## @end deftypefn
 
 ## Author: jwe
@@ -46,7 +51,7 @@
       args = {get(gca (), "view")};
     else
       ax = varargin{1};
-      if (ishandle (ax) && strcmp (get (ax, "type"), "axes"))
+      if (isaxes (ax))
         args = varargin(2:end);
       else
         ax = gca;
--- a/scripts/plot/waitbar.m
+++ b/scripts/plot/waitbar.m
@@ -23,11 +23,12 @@
 ## @deftypefnx {Function File} {} waitbar (@var{frac})
 ## @deftypefnx {Function File} {} waitbar (@var{frac}, @var{hwbar})
 ## @deftypefnx {Function File} {} waitbar (@var{frac}, @var{hwbar}, @var{msg})
-## Return a handle @var{h} to a new waitbar object.  The waitbar is
-## filled to fraction @var{frac} which must be in the range [0, 1].  The
-## optional message @var{msg} is centered and displayed above the waitbar.
-## The appearance of the waitbar figure window can be configured by passing
-## property/value pairs to the function.
+## Return a handle @var{h} to a new waitbar object.
+##
+## The waitbar is filled to fraction @var{frac} which must be in the range
+## [0, 1].  The optional message @var{msg} is centered and displayed above the
+## waitbar.  The appearance of the waitbar figure window can be configured by
+## passing property/value pairs to the function.
 ## 
 ## When called with a single input the current waitbar, if it exists, is
 ## updated to the new value @var{frac}.  If there are multiple outstanding
--- a/scripts/plot/waitforbuttonpress.m
+++ b/scripts/plot/waitforbuttonpress.m
@@ -17,11 +17,13 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {@var{b} =} waitforbuttonpress ()
-## Wait for button or mouse press.over a figure window.  The value of
-## @var{b} returns 0 if a mouse button was pressed or 1 is a key was
-## pressed.
-## @seealso{ginput}
+## @deftypefn  {Function File} {} waitforbuttonpress ()
+## @deftypefnx {Function File} {@var{b} =} waitforbuttonpress ()
+## Wait for mouse click or key press over the current figure window.
+##
+## The return value of @var{b} is 0 if a mouse button was pressed or 1 if a
+## key was pressed.
+## @seealso{waitfor, ginput}
 ## @end deftypefn
 
 ## The original version of this code bore the copyright
--- a/scripts/plot/waterfall.m
+++ b/scripts/plot/waterfall.m
@@ -19,35 +19,59 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} waterfall (@var{x}, @var{y}, @var{z})
 ## @deftypefnx {Function File} {} waterfall (@var{z})
+## @deftypefnx {Function File} {} waterfall (@dots{}, @var{c})
+## @deftypefnx {Function File} {} waterfall (@dots{}, @var{prop}, @var{val}, @dots{})
+## @deftypefnx {Function File} {} waterfall (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} waterfall (@dots{})
-## Plot a waterfall plot given matrices @var{x}, and @var{y} from
-## @code{meshgrid} and a matrix @var{z} corresponding to the @var{x} and
-## @var{y} coordinates of the mesh.  If @var{x} and @var{y} are vectors,
-## then a typical vertex is (@var{x}(j), @var{y}(i), @var{z}(i,j)).  Thus,
-## columns of @var{z} correspond to different @var{x} values and rows of
-## @var{z} correspond to different @var{y} values.
+## Plot a 3-D waterfall plot.
+##
+## A waterfall plot is similar to a @code{meshz} plot except only
+## mesh lines for the rows of @var{z} (x-values) are shown.
+##
+## The wireframe mesh is plotted using rectangles.  The vertices of the
+## rectangles [@var{x}, @var{y}] are typically the output of @code{meshgrid}.
+## over a 2-D rectangular region in the x-y plane.  @var{z} determines the
+## height above the plane of each vertex.  If only a single @var{z} matrix is
+## given, then it is plotted over the meshgrid
+## @code{@var{x} = 1:columns (@var{z}), @var{y} = 1:rows (@var{z})}.
+## Thus, columns of @var{z} correspond to different @var{x} values and rows
+## of @var{z} correspond to different @var{y} values.  
+##
+## The color of the mesh is computed by linearly scaling the @var{Z} values
+## to fit the range of the current colormap.  Use @code{caxis} and/or
+## change the colormap to control the appearance.
+##
+## Optionally the color of the mesh can be specified independently of @var{z}
+## by supplying a color matrix, @var{c}.
+##
+## Any property/value pairs are passed directly to the underlying surface
+## object.
+##
+## If the first argument @var{hax} is an axes handle, then plot into this axis,
+## rather than the current axes returned by @code{gca}.
 ##
 ## The optional return value @var{h} is a graphics handle to the created
 ## surface object.
-## @seealso{meshgrid, meshz, surf}
+##
+## @seealso{meshz, mesh, meshc, contour, surf, surface, ribbon, meshgrid, hidden, shading, colormap, caxis}
 ## @end deftypefn
 
 ## Author: Mike Miller <mtmiller@ieee.org>
 
 function h = waterfall (varargin)
 
-  tmp = meshz (varargin{:});
+  htmp = meshz (varargin{:});
 
-  set (tmp, "meshstyle", "row");
+  set (htmp, "meshstyle", "row");
 
   ## The gnuplot toolkit does nothing with the meshstyle property currently.
-  toolkit = get (ancestor (tmp, "figure"), "__graphics_toolkit__");
+  toolkit = get (ancestor (htmp, "figure"), "__graphics_toolkit__");
   if (strcmp (toolkit, "gnuplot"))
     warning ("waterfall: may not render correctly using toolkit '%s'", toolkit);
   endif
 
   if (nargout > 0)
-    h = tmp;
+    h = htmp;
   endif
 
 endfunction
@@ -56,6 +80,6 @@
 %!demo
 %! clf;
 %! colormap ('default');
-%! [~,~,Z] = peaks ();
+%! Z = peaks ();
 %! waterfall (Z);
 
--- a/scripts/plot/whitebg.m
+++ b/scripts/plot/whitebg.m
@@ -20,20 +20,21 @@
 ## @deftypefn  {Function File} {} whitebg ()
 ## @deftypefnx {Function File} {} whitebg (@var{color})
 ## @deftypefnx {Function File} {} whitebg ("none")
-## @deftypefnx {Function File} {} whitebg (@var{fig})
-## @deftypefnx {Function File} {} whitebg (@var{fig}, @var{color})
-## @deftypefnx {Function File} {} whitebg (@var{fig}, "none")
-## Invert the colors in the current color scheme.  The root properties are
-## also inverted such that all subsequent plot use the new color scheme.
+## @deftypefnx {Function File} {} whitebg (@var{hfig}, @dots{})
+## Invert the colors in the current color scheme.
 ##
-## If defined, @var{fig} is the handle to the figure to be inverted.  In
-## this case only the specified figure has its color properties changed.
+## The root properties are also inverted such that all subsequent plot use the
+## new color scheme.
 ##
 ## If the optional argument @var{color} is present then the background color
 ## is set to @var{color} rather than inverted.  @var{color} may be a string
 ## representing one of the eight known colors or an RGB triplet.  The special
 ## string argument "none" restores the plot to the default colors.
-## @seealso{reset}
+##
+## If the first argument @var{hfig} is a figure handle, then operate on
+## this figure rather than the current figure returned by @code{gcf}.  The
+## root properties will not be changed.
+## @seealso{reset, get, set}
 ## @end deftypefn
 
 function whitebg (varargin)
--- a/scripts/plot/xlabel.m
+++ b/scripts/plot/xlabel.m
@@ -19,19 +19,19 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} xlabel (@var{string})
 ## @deftypefnx {Function File} {} xlabel (@var{string}, @var{property}, @var{val}, @dots{})
-## @deftypefnx {Function File} {} xlabel (@var{hax}, @var{string})
-## @deftypefnx {Function File} {} xlabel (@var{hax}, @var{string}, @var{property}, @var{val}, @dots{})
+## @deftypefnx {Function File} {} xlabel (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} xlabel (@dots{})
 ## Specify the string used to label the x-axis of the current axis.
 ##
-## If @var{hax} is specified then label the axis defined by @var{hax}.
-##
 ## An optional list of @var{property}/@var{value} pairs can be used to change
 ## the properties of the created text label.
 ##
+## If the first argument @var{hax} is an axes handle, then operate on
+## this axis rather than the current axes returned by @code{gca}.
+##
 ## The optional return value @var{h} is a graphics handle to the created text
 ## object.
-## @seealso{ylabel, zlabel, title, text}
+## @seealso{ylabel, zlabel, datetick, title, text}
 ## @end deftypefn
 
 ## Author: jwe
--- a/scripts/plot/xlim.m
+++ b/scripts/plot/xlim.m
@@ -17,28 +17,27 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @c List other forms of function in documentation index
-## @findex ylim
-## @findex zlim
+## @deftypefn  {Function File} {@var{xlimits} =} xlim ()
+## @deftypefnx {Function File} {@var{xmode} =} xlim ("mode")
+## @deftypefnx {Function File} {} xlim ([@var{x_lo} @var{x_hi}])
+## @deftypefnx {Function File} {} xlim ("auto")
+## @deftypefnx {Function File} {} xlim ("manual")
+## @deftypefnx {Function File} {} xlim (@var{hax}, @dots{})
+## Query or set the limits of the x-axis of the current plot.
 ##
-## @deftypefn  {Function File} {@var{xl} =} xlim ()
-## @deftypefnx {Function File} {} xlim (@var{xl})
-## @deftypefnx {Function File} {@var{m} =} xlim ("mode")
-## @deftypefnx {Function File} {} xlim (@var{m})
-## @deftypefnx {Function File} {} xlim (@var{h}, @dots{})
-## Get or set the limits of the x-axis of the current plot.  Called without
-## arguments @code{xlim} returns the x-axis limits of the current plot.
-## If passed a two element vector @var{xl}, the limits of the x-axis are set
-## to this value.
+## Called without arguments @code{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 [@var{x_lo} @var{x_hi}], the limits of the
+## x-axis are set to these values.
 ##
-## The current mode for calculation of the x-axis can be returned with a
-## call @code{xlim ("mode")}, and can be either "auto" or "manual".  The
-## current plotting mode can be set by passing either "auto" or "manual"
-## as the argument.
+## The current plotting mode can be set by passing either "auto" or "manual" as
+## the argument.
 ##
-## If passed a handle as the first argument, then operate on this handle
-## rather than the current axes handle.
-## @seealso{ylim, zlim, set, get, gca}
+## If the first argument @var{hax} is an axes handle, then operate on
+## this axis rather than the current axes returned by @code{gca}.
+## @seealso{ylim, zlim, axis, set, get, gca}
 ## @end deftypefn
 
 function retval = xlim (varargin)
--- a/scripts/plot/ylabel.m
+++ b/scripts/plot/ylabel.m
@@ -19,8 +19,7 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} ylabel (@var{string})
 ## @deftypefnx {Function File} {} ylabel (@var{string}, @var{property}, @var{val}, @dots{})
-## @deftypefnx {Function File} {} ylabel (@var{hax}, @var{string})
-## @deftypefnx {Function File} {} ylabel (@var{hax}, @var{string}, @var{property}, @var{val}, @dots{})
+## @deftypefnx {Function File} {} ylabel (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} ylabel (@dots{})
 ## Specify the string used to label the y-axis of the current axis.
 ##
@@ -29,9 +28,12 @@
 ## An optional list of @var{property}/@var{value} pairs can be used to change
 ## the properties of the created text label.
 ##
+## If the first argument @var{hax} is an axes handle, then operate on
+## this axis rather than the current axes returned by @code{gca}.
+##
 ## The optional return value @var{h} is a graphics handle to the created text
 ## object.
-## @seealso{xlabel, zlabel, title, text}
+## @seealso{xlabel, zlabel, datetick, title, text}
 ## @end deftypefn
 
 ## Author: jwe
--- a/scripts/plot/ylim.m
+++ b/scripts/plot/ylim.m
@@ -17,24 +17,27 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{yl} =} ylim ()
-## @deftypefnx {Function File} {} ylim (@var{yl})
-## @deftypefnx {Function File} {@var{m} =} ylim ("mode")
-## @deftypefnx {Function File} {} ylim (@var{m})
-## @deftypefnx {Function File} {} ylim (@var{h}, @dots{})
-## Get or set the limits of the y-axis of the current plot.  Called without
-## arguments @code{ylim} returns the y-axis limits of the current plot.
-## If passed a two element vector @var{yl}, the limits of the y-axis are set
-## to this value.
+## @deftypefn  {Function File} {@var{ylimits} =} ylim ()
+## @deftypefnx {Function File} {@var{xmode} =} ylim ("mode")
+## @deftypefnx {Function File} {} ylim ([@var{y_lo} @var{y_hi}])
+## @deftypefnx {Function File} {} ylim ("auto")
+## @deftypefnx {Function File} {} ylim ("manual")
+## @deftypefnx {Function File} {} ylim (@var{hax}, @dots{})
+## Query or set the limits of the y-axis of the current plot.
 ##
-## The current mode for calculation of the y-axis can be returned with a
-## call @code{ylim ("mode")}, and can be either "auto" or "manual".  The
-## current plotting mode can be set by passing either "auto" or "manual"
-## as the argument.
+## Called without arguments @code{ylim} returns the y-axis limits of the
+## current plot.  With the input query "mode", return the current y-limit
+## calculation mode which is either "auto" or "manual".
+##
+## If passed a 2-element vector [@var{y_lo} @var{y_hi}], the limits of the
+## y-axis are set to these values.
 ##
-## If passed a handle as the first argument, then operate on this handle
-## rather than the current axes handle.
-## @seealso{xlim, zlim, set, get, gca}
+## The current plotting mode can be set by passing either "auto" or "manual" as
+## the argument.
+##
+## If the first argument @var{hax} is an axes handle, then operate on
+## this axis rather than the current axes returned by @code{gca}.
+## @seealso{xlim, zlim, axis, set, get, gca}
 ## @end deftypefn
 
 function retval = ylim (varargin)
--- a/scripts/plot/zlabel.m
+++ b/scripts/plot/zlabel.m
@@ -19,19 +19,19 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} zlabel (@var{string})
 ## @deftypefnx {Function File} {} zlabel (@var{string}, @var{property}, @var{val}, @dots{})
-## @deftypefnx {Function File} {} zlabel (@var{hax}, @var{string})
-## @deftypefnx {Function File} {} zlabel (@var{hax}, @var{string}, @var{property}, @var{val}, @dots{})
+## @deftypefnx {Function File} {} zlabel (@var{hax}, @dots{})
 ## @deftypefnx {Function File} {@var{h} =} zlabel (@dots{})
 ## Specify the string used to label the z-axis of the current axis.
 ##
-## If @var{hax} is specified then label the axis defined by @var{hax}.
-##
 ## An optional list of @var{property}/@var{value} pairs can be used to change
 ## the properties of the created text label.
 ##
+## If the first argument @var{hax} is an axes handle, then operate on
+## this axis rather than the current axes returned by @code{gca}.
+##
 ## The optional return value @var{h} is a graphics handle to the created text
 ## object.
-## @seealso{xlabel, ylabel, title, text}
+## @seealso{xlabel, ylabel, datetick, title, text}
 ## @end deftypefn
 ## Author: jwe
 
@@ -72,7 +72,7 @@
 
 %!test
 %! hf = figure ("visible", "off");
-%! plot3 (hf, 0, 0, 0);
+%! plot3 (0, 0, 0);
 %! unwind_protect
 %!   z = zlabel ("zlabel_string");
 %!   assert (get (gca, "zlabel"), z);
--- a/scripts/plot/zlim.m
+++ b/scripts/plot/zlim.m
@@ -17,24 +17,27 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {@var{zl} =} zlim ()
-## @deftypefnx {Function File} {} zlim (@var{zl})
-## @deftypefnx {Function File} {@var{m} =} zlim ("mode")
-## @deftypefnx {Function File} {} zlim (@var{m})
-## @deftypefnx {Function File} {} zlim (@var{h}, @dots{})
-## Get or set the limits of the z-axis of the current plot.  Called without
-## arguments @code{zlim} returns the z-axis limits of the current plot.
-## If passed a two element vector @var{zl}, the limits of the z-axis are set
-## to this value.
+## @deftypefn  {Function File} {@var{zlimits} =} zlim ()
+## @deftypefnx {Function File} {@var{xmode} =} zlim ("mode")
+## @deftypefnx {Function File} {} zlim ([@var{z_lo} @var{z_hi}])
+## @deftypefnx {Function File} {} zlim ("auto")
+## @deftypefnx {Function File} {} zlim ("manual")
+## @deftypefnx {Function File} {} zlim (@var{hax}, @dots{})
+## Query or set the limits of the z-axis of the current plot.
 ##
-## The current mode for calculation of the z-axis can be returned with a
-## call @code{zlim ("mode")}, and can be either "auto" or "manual".  The
-## current plotting mode can be set by passing either "auto" or "manual"
-## as the argument.
+## Called without arguments @code{zlim} returns the z-axis limits of the
+## current plot.  With the input query "mode", return the current z-limit
+## calculation mode which is either "auto" or "manual".
+##
+## If passed a 2-element vector [@var{z_lo} @var{z_hi}], the limits of the
+## z-axis are set to these values.
 ##
-## If passed a handle as the first argument, then operate on this handle
-## rather than the current axes handle.
-## @seealso{xlim, ylim, set, get, gca}
+## The current plotting mode can be set by passing either "auto" or "manual" as
+## the argument.
+##
+## If the first argument @var{hax} is an axes handle, then operate on
+## this axis rather than the current axes returned by @code{gca}.
+## @seealso{xlim, ylim, axis, set, get, gca}
 ## @end deftypefn
 
 function retval = zlim (varargin)
--- a/src/main.cc
+++ b/src/main.cc
@@ -51,3 +51,22 @@
 
   return retval;
 }
+
+
+/*!
+@mainpage Source code documentation for GNU Octave
+
+GNU Octave is a high-level language, primarily intended for numerical
+computations.  It provides a convenient interactive command line
+interface for solving linear and nonlinear problems numerically, and
+for performing other numerical experiments.  It may also be used as a
+batch-oriented language for data processing.
+
+GNU Octave is free software. You may redistribute it and/or modify it
+under the terms of the <a href="http://www.gnu.org/licenses/">GNU
+General Public License</a> as published by the Free Software Foundation.
+
+This is the developer documentation for Octave's own source code. It is
+intended to help for hacking Octave. It may also be useful for
+understanding the Octave API when writing your own .oct files.
+*/