bugGNU Octave - Bugs: bug #34397, patch object does not implement...

 
 

bug #34397: patch object does not implement indexed color assignments

Submitted by:  Rik <rik5>
Submitted on:  Mon 26 Sep 2011 08:59:27 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 28 Sep 2011 03:38:59 PM UTC, comment #2:

Kai,

You are correct. I am going to mark this bug invalid and close. However, I do believe I have uncovered something wrong with using 'cdata' as opposed to 'facevertexcdata'. I'll report that in a different bug.

Rik <rik5>
Project Administrator
Tue 27 Sep 2011 08:31:16 AM UTC, comment #1:

Rik,

for a scaled cdatamapping the color is choosen relative to the clim property of the current axis object. For your example clim should be set to [-0.1 1.9] and therefore the color should be jet()(32,:).

It seems we set the clim property not correctly, because in 3.2.4 it is set to [0.9 1.9] and gives the color: jet()(1,:) or [0 0 0.5]

To get an index color assigment you have to set the cdatamapping to direct and provide the actual index.

p = patch([1 1 2],[1 2 2], 58, "cdatamapping","direct");

This works as expected.

Kai

Kai Habel <kahacjde>
Project Member
Mon 26 Sep 2011 08:59:27 PM UTC, original submission:

Sample code to observe the problem

In the default colormap this should be 0.9 * 64 = 58. The patch object does work with RGB triplets.

More information about the graphics properties and how they are supposed to be implemented can be found here (http://www.mathworks.com/help/techdoc/ref/patch_props.html)

Rik <rik5>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by kahacjde (Posted a comment)
  • -unavailable- added by rik5 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 28 Sep 2011 03:38:59 PM UTCrik5StatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1