[Pkg-octave-devel] Bug#492038: octave3.0: pcolor does not show all data

David Bateman adb014 at gmail.com
Sun Jul 27 00:05:26 UTC 2008


Francesco Potorti` wrote:
> package octave3.0
> tags 492038 upstream
> stop
> 
> Dear Octave maintainers,
> 
> The bug report reproduced below has been filed against the Debian 
> package and regards the upstream sources.  The report is recorded at
> http://bugs.debian.org/492038
> 
> Thanks,
> 
> Package: octave3.0
> Version: 1:3.0.1-4
> Severity: normal
> 
> If you try
>   pcolor(1:3,1:3,reshape(1:9,3,3))
> you see that it only displays four colours.  In general, pcolor does not
> display anything for the last row and column.  Those data are ignored as
> far as plotting is concerned.  However, they are taken into account as
> far as axis limits are concerned, both for ticks and for colors.  I
> don't know if it is done for compatibility with Matlab.  Anyway, this
> function corrects the problem when pcolor is called with vector X and Y:
> 
> function mypcolor(x,y,z)
>   x0=3*x(1)-x(2);xe=3*x(end)-x(end-1);xm=x(1:end-1)+x(2:end);x=[x0;xm(:);xe]/2;
>   y0=3*y(1)-y(2);ye=3*y(end)-y(end-1);ym=y(1:end-1)+y(2:end);y=[y0;ym(:);ye]/2;
>   z=[z,z(:,end);z(end,:),z(end,end)];
>   pcolor(x,y,z);
> endfunction
> 
> 

If you look at

http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/pcolor.html

you'll see that pcolor does indeed have the compatible behavior. The
reasoning is that the patch color might be interpolated from the four
vertices of the patch in pcolor (though I don't believe Octave can
handle that yet). I propose to do nothing about this bug report.

D.






More information about the Pkg-octave-devel mailing list