bugGNU Octave - Bugs: bug #40777, fill() should replicate column...

 
 

bug #40777: fill() should replicate column vector cdata

Submitter:  Rik <rik5>
Submitted:  Mon 02 Dec 2013 06:48:45 PM UTC
   
 
Category:  Octave Function 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 04 Dec 2013 04:39:55 AM UTC, comment #3: 

I pushed a patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/b4b5ee91561a).  Closing report.

Rik <rik5>
Group administrator
Tue 03 Dec 2013 09:41:45 PM UTC, comment #2: 

Great.  That's what I needed to know.  I'll get to this soon.

Rik <rik5>
Group administrator
Tue 03 Dec 2013 09:09:39 PM UTC, comment #1: 

If it can help you decide, in matlab this rule (duplicate colors) doesn't apply to patch function:


>> patch (x, y, [c, c]); # works
>> patch (x, y, c); # produces 4 warnings and an invisible patch
Warning: Color Data is not set for Interpolated shading


So this seams like a fill specific rule that should belong in this function.

Pantxo Diribarne <pantxo>
Group Member
Mon 02 Dec 2013 06:48:45 PM UTC, original submission:  

When given multiple polygons to display, fill should replicate per-vertex cdata for compatibility with Matlab.

Sample code:


x = [0 0
     1 0.5
     1 0.5
     0 0];
y = [0 0
     0 0
     1 0.5
     1 0.5];
c = [1 2 3 4]';
fill (x, y, c);
error: patch: size of x, y, and c must be equal
error: called from:
error:   /home/rik/wip/Projects_Mine/octave-dev/scripts/plot/draw/private/__patch__.m at line 168, column 13
error:   /home/rik/wip/Projects_Mine/octave-dev/scripts/plot/draw/fill.m at line 97, column 20


But manually replicating the data works


fill (x, y, [c, c]);


I don't know if the best spot for this is within fill.m or whether it belongs in _patch_.m.

Rik <rik5>
Group administrator

 

(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

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by rik5 (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
    2014-01-20 mtmiller Dependencies- bugs #41285 is dependent
    2013-12-04 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code