[manual] suggested addition to pcolor description

Ben Abbott bpabbott at mac.com
Tue Jan 20 10:42:32 CST 2009


On Tuesday, January 20, 2009, at 11:01AM, "John W. Eaton" <jwe at octave.org> wrote:
>On 23-Sep-2008, Francesco Potorti` wrote:
>
>| >However, in Matlab there clearly is (as the color interpolates across  
>| >each patch). Each rectangle of the mesh is interpreted as a pair of  
>| >triangles and the color is linearly interpolated across it.
>| 
>| I see.  Thank you.  Probably this explanation should go into the
>| documentation for `shading'.
>
>If it has not happened already, could someone please propose a
>changeset for this?
>
>| Maybe with a note saying that the gnuplot backend does not implement
>| "interp".
>
>I think "interp" will work with gnuplot 4.3.  Can someone confirm?
>
>Thanks,
>
>jwe

The Octave changeset for this is ...

    http://hg.savannah.gnu.org/hgweb/octave/rev/4024fc815f8d

This funtionality is present in gnuplot 4.3 and (if I recall correctly) is now in the 4.2.x branch as well.

On caveat is that gnuplot's method of interpolation is different than that of Matlab's. As Francesco points out the commercial variant splits rectangles into a pair of triangles and performs a linear interpolation of the color across the triangle. Although I do not know what algorithm is used, gnuplot does not work the same way.

Ben


More information about the Bug-octave mailing list