bugGNU Octave - Bugs: bug #51082, Colormap should be tied to figure...

 
 

bug #51082: Colormap should be tied to figure instead of axis

Submitter:  -X- <jsh>
Submitted:  Sun 21 May 2017 12:01:34 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.2.1 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 22 May 2017 12:52:15 AM UTC, comment #1: 

This is complicated as Matlab has been changing the interface around colormap.  It used to be that colormap was only a property of figure objects.  However, in recent versions Matlab has extended colormaps to apply to axes objects as well.  See http://www.mathworks.com/help/matlab/ref/colormap.html.

Octave currently only implements colormap objects for figure objects.  There is a bug report to extend it to axes objects.  See bug #48667.

The reason why the code below works in Octave is that Octave searches for the parent figure object of any axes and places the colormap data on the figure.


f=figure;
colormap(gca,'cool')
get(f,'colormap')


Thus, for Octave this will return the 'cool' colormap.  But for Matlab, the 'cool' colormap will have been placed in the axes colormap property.  While the figure colormap property will still retain the default map.

Rik <rik5>
Group administrator
Sun 21 May 2017 12:01:34 PM UTC, original submission:  

Octave seems to implement colormap() on the axis object while Matlab it is tied to the figure. For example this works in Matlab


f=figure;
colormap(f,'cool')
get(f,'colormap')


while the following works in Octave, but returns the default colormap in later Matlab versions


f=figure;
colormap(gca,'cool')
get(f,'colormap')


-X- <jsh>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

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 jsh (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
    2017-05-22 rik5 Open/ClosedOpen Closed
    2017-05-22 rik5 Dependencies- Depends on bugs #48667
    2017-05-22 rik5 StatusNone Duplicate

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code