bugGNU Octave - Bugs: bug #43850, fill() returns only one handle...

 
 

bug #43850: fill() returns only one handle when plotting multiple polygons

Submitter:  sergey plotnikov <nul0m>
Submitted:  Fri 19 Dec 2014 03:15:09 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 14 Dec 2016 05:15:03 AM UTC, comment #2: 

Forgot to mark this as fixed in this changeset


changeset:   22695:d6164341b64d
user:        Rik <rik@octave.org>
date:        Fri Oct 28 11:37:33 2016 -0700
summary:     fill.m: Return one patch handle per polygon created for Matlab compatibility.



Rik <rik5>
Group administrator
Mon 29 Dec 2014 06:33:47 AM UTC, comment #1: 

Confirmed.  It appears that Octave creates one patch object for each input argument set, rather than one patch object for each column of vertices.  This produces 3 patch objects.


h = fill (vertices(:,1),vertices(:,2), 'm', vertices(:,1)+1,vertices(:,2)+1, 'm', vertices(:,1)+2,vertices(:,2)+2, 'm')


I think this is mostly just adding a for loop inside fill.m which runs over each column of vertices.  There may be a little bit more work to get the cdata replicated.

Rik <rik5>
Group administrator
Fri 19 Dec 2014 03:15:09 PM UTC, original submission:  

Matlab returns you as may handles as many polygons you plotted using fill(). See simple example below.

Matlab:

>> close all
vertices = [0 0;1 0;1 1;0 1];
h = fill ([vertices(:,1),vertices(:,1)+1,vertices(:,1)+2], [vertices(:,2),vertices(:,2)+1,vertices(:,2)+2], 'm')

h =

    0.0016
  175.0021
  176.0016



Octave:

>> close all

>> vertices = [0 0;1 0;1 1;0 1];

>> h = fill ([vertices(:,1),vertices(:,1)+1,vertices(:,1)+2], [vertices(:,2),vertices(:,2)+1,vertices(:,2)+2], 'm')
h = -1.3670


sergey plotnikov <nul0m>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by nul0m (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.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-12-14 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2014-12-29 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code