bugGNU Octave - Bugs: bug #65363, fill3 alters the graphic already...


bug #65363: fill3 alters the graphic already with hold-on.

Submitter:  Liang Tang <lt1234>
Submitted:  Sat 24 Feb 2024 11:20:28 PM UTC
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  lt1234 Open/Closed:  * Open
Release:  * 8.2.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Sat 24 Feb 2024 11:20:28 PM UTC, original submission:  


I observed what below with fill3.  Therefore, I reported specifically for fill3 only.  Ihis issue is also a matlab compatibility issue. 

In the example, the same data, P, are displayed with patch and fill3 respectively in subplots 1 and 2. The resulting overall displays from the two functions are different. 

The patch and fill3 subplots , with different view, [0 90] and [-37.5 30], are incompatible with matlab, both [0 90].  Octave fill3 must have triggered new camera parameters, while the patch and fill3 defined by P occupy the same space.  I did not find any documentation to indicate the two functions should be different in updating display with hold-on. Therefore, I expect the two subplots to be identical. 

The small example demonstrates the fill3 compatibility issue:  

% both CCW order P0 is estimated from plane_1=@(x) [1 2 3 ]*x-06; 

P0=[6  3 -4
    0 -2 -4
    0 -6  6
    6 -6  3];

% an arbitrary rectangle    
   2.2136   1.8866   2.4160
   1.5450   2.8580   0.1131
  -0.9062   1.1710   0.1131
  -0.2377   0.1995   2.4160]; 
patch(ax1,P0(:,1), P0(:,2), P0(:,3), 'r'); hold on; xlabel('x'); ylabel('y'); title('patch')
patch(ax1,P(:,1),  P( :,2), P( :,3), 'c');   % subplot(1,2,1); ; view([-37.5 30]);  
patch(ax2,P0(:,1), P0(:,2), P0(:,3), 'r'); hold on; xlabel('x'); ylabel('y'); title('fill3')
fill3(ax2,P( :,1), P( :,2), P( :,3), 'c');   % subplot(1,2,2); ; view([0 90]);  
saveas(gcf, 'patch_fill3.ofig');

subplot(1,2,1); a1=get(gca); subplot(1,2,2); a2=get(gca);

[a1.view;           a2.view]
[a1.cameratarget;   a2.cameratarget]
[a1.cameraposition; a2.cameraposition]

Liang Tang <lt1234>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #55744:  patch_fill3.zip added by lt1234 (7KiB - application/x-zip-compressed)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by lt1234 (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.


    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-02-24 lt1234 Attached File- Added patch_fill3.zip, #55744

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code