[manual] suggested addition to pcolor description
Francesco Potorti`
Potorti at isti.cnr.it
Tue Sep 23 00:53:21 CDT 2008
>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'.
Maybe with a note saying that the gnuplot backend does not implement
"interp".
>> Yes, but what is essential, and is not mentioned, is that if C is 3x3,
>> pcolor draws a picture with 4 (2x2) rectangles, because the 3x3 values
>> of C are intended to be at the mesh vertices. This is not documented
>> anywhere. On the other hand, imagesc, which does a very similar job,
>> draws instead a picture with 9 (3x3) rectangles, because the values of
>> its argument are intended to be in the middle of the mesh rectangles
>> (not at the vertices). In my opinion, it is well worth noting the
>> similarities and differences between the two in the manual; I only
>> discovered them after quite some time doing experiments.
>
>I was unware of those features. Can you post a simple example? Perhaps
>you can modify the one I provided above?
It is simpler by using less points. Just try this:
pcolor(magic(3)); shading("flat")
gives you four (2x2) patches. On the other hand,
imagesc(magic(3)); axis("xy")
gives you nine (3x3) patches.
More information about the Bug-octave
mailing list