[changeset-v2] clarification to pcolor doc-string
Ben Abbott
bpabbott at mac.com
Tue Sep 23 09:28:28 CDT 2008
On Tuesday, September 23, 2008, at 10:06AM, "Francesco Potorti`" <Potorti at isti.cnr.it> wrote:
>>>>+## @code{shading} modifies an attribute determining the manner by which the
>>>>+## face color of each cell is interpolated from the values of @var{c},
>>>>+## and the visibility of the cells' edges. By default the attribute is
>>>>+## "flat", which renders a single color for each cell's face with the edge
>>>>+## visible.
>>>
>>>The text is correct, apart from the fact that this is not the "flat"
>>>attribute, but "interp" or "faceted" (I can not tell which).
>>
>>The code for pcolor.m appears to be setting each patch to "flat"
>> set (tmp, "facecolor", "flat");
>>Why is it you think that is not the case?
>
>This is what I observe with Octave 3.0.1 and gnuplot 4.2.3 on Debian:
>
>## produce a plot with 16 (4x4) squares
>octave> pcolor(magic(5)) # edges are visible (black lines)
>octave> shading("flat") # edges become invisible
>octave> shading('interp') # no change
>octave> shading('faceted') # edges become visible again
>
>So apparently the default is "faceted". I cannot find this as a
>property of the plot though, so I can only deduce that by looking at the
>plot.
Ok, I made the change.
Ben
-------------- next part --------------
# HG changeset patch
# User Ben Abbott <bpabbott at mac.com>
# Date 1222179854 14400
# Node ID 92f66e31cf9173ba0c0d82001b6412af956e2326
# Parent de8b07e95d1b96a20f815b0825799d625fe8ec53
pcolor.m: Improve doc strings.
diff -r de8b07e95d1b -r 92f66e31cf91 scripts/ChangeLog
--- a/scripts/ChangeLog Mon Sep 22 13:38:15 2008 -0400
+++ b/scripts/ChangeLog Tue Sep 23 10:24:14 2008 -0400
@@ -1,3 +1,7 @@
+2008-09-22 Francesco Potort?¨ <Potorti at isti.cnr.it>
+
+ * plot/pcolor.m: Improve doc string.
+
2008-09-22 Ben Abbott <bpabbott at mac.com>
* plot/comet.m: New file.
diff -r de8b07e95d1b -r 92f66e31cf91 scripts/plot/pcolor.m
--- a/scripts/plot/pcolor.m Mon Sep 22 13:38:15 2008 -0400
+++ b/scripts/plot/pcolor.m Tue Sep 23 10:24:14 2008 -0400
@@ -21,11 +21,29 @@
## @deftypefnx {Function File} {} pcolor (@var{c})
## Density plot for given matrices @var{x}, and @var{y} from @code{meshgrid} and
## a matrix @var{c} corresponding to the @var{x} and @var{y} coordinates of
-## the mesh. If @var{x} and @var{y} are vectors, then a typical vertex
+## the mesh's vertices. If @var{x} and @var{y} are vectors, then a typical vertex
## is (@var{x}(j), @var{y}(i), @var{c}(i,j)). Thus, columns of @var{c}
## correspond to different @var{x} values and rows of @var{c} correspond
## to different @var{y} values.
-## @seealso{meshgrid, contour}
+##
+## The @code{colormap} is scaled to the extents of @var{c}.
+## Limits may be placed on the color axis by the
+## command @code{caxis}, or by setting the @code{clim} property of the
+## parent axis.
+##
+## The face color of each cell of the mesh is determined by interpolating
+## the values of @var{c} for the cell's vertices. Contrast this with
+## @code{imagesc} which renders one cell for each element of @var{c}.
+##
+## @code{shading} modifies an attribute determining the manner by which the
+## face color of each cell is interpolated from the values of @var{c},
+## and the visibility of the cells' edges. By default the attribute is
+## "faceted", which renders a single color for each cell's face with the edge
+## visible.
+##
+## @var{h} is the handle to the surface object.
+##
+## @seealso{caxis, contour, meshgrid, imagesc, shading}
## @end deftypefn
## Author: Kai Habel <kai.habel at gmx.de>
More information about the Bug-octave
mailing list