contourf(peaks) ?

Ben Abbott bpabbott at mac.com
Thu Oct 16 08:27:31 CDT 2008


On Oct 16, 2008, at 6:00 AM, David Bateman wrote:

> David Bateman wrote:
>> Kai Habel wrote:
>>> Hello all,
>>>
>>> I am currently recompiling octave, can someone please confirm/deny  
>>> that
>>> with a recent tip
>>>
>>> contourf(peaks)
>>>
>>> shows only a cyan rectangle?
>>>
>>> Kai
>>>
>>>
>>
>> Confirmed... This looks like its because of the recent changes for  
>> binary transfer of color palette data to gnuplot. Also if you try
>>
>> contourf(peaks())
>> colorbar()
>>
>> you'll see that there is an error given by gnuplot and the colorbar  
>> is not displayed.. I'd rather not touch this myself and leave  
>> Daniel who made these changes fix the issue..
>>
> The attached changeset at least fixes the binary transfer code of  
> gnuplot such that
>
> contour(peaks()); colorbar();
>
> works as expected... It appears that this recent change in fact  
> broke all images that might be displayed. Not sure why  
> "contourf(peaks())" is broken though..
>
> Regards
> David

It appears the problem has to do with the order of the handles of the  
patch objects. I believe John changed the order so that new objects  
are added to the beginning (as is done in Matlab). This means that the  
patches in contourf are drawn in reverse order with the lowest/largest  
one covering the others ... to be honest I haven't looked at the  
detail. So my impression might be wrong ... perhaps Daniel changed the  
order in his binary transfer?

In any event, if the problem is not with the binary transfer, the  
attached changeset fixes it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: changeset-contourf.patch
Type: application/octet-stream
Size: 1124 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/bug-octave/attachments/20081016/daf2be8a/attachment.obj 
-------------- next part --------------








More information about the Bug-octave mailing list