bugGNU Octave - Bugs: bug #54757, Applying colormap to axes does not...

 
 

bug #54757: Applying colormap to axes does not update the legend

Submitter:  None
Submitted:  Sun 30 Sep 2018 09:47:53 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Philip Yip Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 19 Nov 2019 04:04:27 PM UTC, comment #4: 

This has been fixed up again.  Re-closing report.

Rik <rik5>
Group administrator
Tue 19 Nov 2019 02:53:09 PM UTC, comment #3: 

I pushed the following cset which fixes the issue for me:

http://hg.savannah.gnu.org/hgweb/octave/rev/790038c12003

Pantxo Diribarne <pantxo>
Group Member
Mon 18 Nov 2019 10:16:21 PM UTC, comment #2: 

Unfortunately there has been a regression with the new legend code destined for the 6.1 release and this bug has re-appeared.

Rik <rik5>
Group administrator
Mon 04 Mar 2019 01:17:28 AM UTC, comment #1: 

I fixed things up in this changeset (https://hg.savannah.gnu.org/hgweb/octave/rev/ca40628fff39) on the development branch.  This will be a part of the 6.1 release.

Rik <rik5>
Group administrator
Sun 30 Sep 2018 09:47:53 AM UTC, original submission:  

In the following code the legend of the figure is not updated to include the new colormap (in MATLAB it is):

% orange shades
orange=[237/255,112/255,20/255];
tangerine=[249/255,130/255,40/255];
merigold=[253/255,174/255,29/255];
cider=[181/255,103/255,39/255];
data=ones(4,1);
figure
pie(data);
colormap(gca,[orange;tangerine;merigold;cider]);
labels={'orange';'tangerine';'merigold';'cider'};
legend(labels,'Location','eastoutside');
title('orange shade wheel');

If the line:
colormap(gca,[orange;tangerine;merigold;cider]);
Is modified to:
colormap([orange;tangerine;merigold;cider]);
Then the colormap will be updated to update the legend.
However if subplots are used, it applies the last specified colormap to every subplot in the plot.


Anonymous

 

(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 pantxo (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by rik5 (Posted a comment)
  •  

    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 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-11-20 pantxo Open/ClosedOpen Closed
    2019-11-19 rik5 StatusReady For Test Fixed
    2019-11-19 pantxo StatusConfirmed Ready For Test
    2019-11-18 rik5 StatusFixed Confirmed
        Open/ClosedClosed Open
        Carbon-Copy- Added pantxo
    2019-03-04 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
        Release4.4.1 dev
        Operating SystemMicrosoft Windows Any
    2019-01-24 mtmiller CategoryNone Octave Function
        Item GroupNone Matlab Compatibility

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code