[changeset] clarification to pcolor doc-string

John W. Eaton jwe at bevo.che.wisc.edu
Tue Sep 23 09:24:40 CDT 2008


On 23-Sep-2008, Francesco Potorti` 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.

In the current development sources, I see:

  octave:9> h = pcolor (magic (5))
  h = -2.8337
  octave:10> get (h, 'facecolor')
  ans = flat
  octave:11> get (h, 'edgecolor')
  ans =

     0   0   0

  octave:12> shading ('flat')
  octave:13> get (h, 'facecolor')
  ans = flat
  octave:14> get (h, 'edgecolor')
  ans = none

This appears to be compatible behavior.

Does gnuplot directly support an interpolated image viewing mode?  If
not, then I suppose someone would need to write the code in
__go_draw_axes__.m to support this feature by taking the given data,
doing the interpolation, and passing something else along to gnuplot.
But don't wait for me to do it, I'm not that someone.  But I would
consider patches.

Thanks,

jwe


More information about the Bug-octave mailing list