bugGNU Octave - Bugs: bug #39291, ColorOrder property seems to be...

 
 

bug #39291: ColorOrder property seems to be ignored

Submitter:  Carl <costerwi>
Submitted:  Wed 19 Jun 2013 03:33:23 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.6.4 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 25 Jun 2013 07:06:04 PM UTC, comment #5: 

I'm not sure anybody checks this after it has been closed (I guess I took too long to respond originally)

My patch is now posted here:
https://savannah.gnu.org/bugs/index.php?39344

Carl <costerwi>
Fri 21 Jun 2013 06:56:55 PM UTC, comment #4: 

I tested too and it works the first time on my system as well (MinGW Octave-3.6.4_gcc4.6.2).  The problem seems to be that the property is not always checked for new subplots and figures.

I'm still investigating the code but there are several persistent variables which are shared by all figures in the _next_line_color_() function.  I don't have a copy of Matlab to test but I assume it maintains a seperate ColorOrder and color_index for each axes handle.

I think I have a better version I will try to attach.

Carl <costerwi>
Fri 21 Jun 2013 06:11:20 PM UTC, comment #3: 

With octave-3.6.4_MSVC2010 I get essentially the same figure as Matlab r2013b prerelease.

I'd suggest a reinstallation of Octave.

Closing report with "invalid"

Philip Nienhuis <philipnienhuis>
Group Member
Wed 19 Jun 2013 06:42:37 PM UTC, comment #2: 

It works correctly on windows using Octave-3.6.4_gcc4.6.2 (MinGW), Octave-3.6.2_MSVC2010, and with an MXE-built Octave-3.7.5. That is I get the same plots as Rik.

Did you use the 3.6.4 MSVC version?

Perhaps a reinstallation of Octave could help.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 19 Jun 2013 05:39:50 PM UTC, comment #1: 

This works correctly on a Linux platform with 3.6.4.  See the atttached png of the output.  If you can't get it to work there may be something wrong with your Microsoft Windows build of 3.6.4.


Rik <rik5>
Group administrator
Wed 19 Jun 2013 03:33:23 PM UTC, original submission:  

From Matlab documentation:
The axes ColorOrder property determines the color of the individual lines drawn by the plot and plot3 functions. For multiline graphs, these functions cycle through the colors defined by ColorOrder, repeating the cycle when they reach the end of the list.

I can get and set the ColorOrder property but the plot function seems to ignore it; prefering its internal colors which never change.  This is true for both fltk and gnuplot.

Example:

set(gca, 'ColorOrder', summer(10));
hold all;
for m = 1:50
  plot([0 51-m], [0 m]);
end


Thanks for any help!

Carl <costerwi>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #28379:  __next_line_color__.m added by costerwi (2KiB - application/octet-stream)
file #28351:  ColorOrder.png added by rik5 (138KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by costerwi (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-06-21 costerwi Attached File- Added _next_line_color_.m, #28379
    2013-06-21 philipnienhuis StatusWorks For Me Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2013-06-19 rik5 Attached File- Added ColorOrder.png, #28351
        StatusNone Works For Me

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code