bugGNU Octave - Bugs: bug #39585, plot3 ignores setting color...


bug #39585: plot3 ignores setting color through linespec with gnuplot

Submitted by:  None
Submitted on:  Sun 28 Jul 2013 03:58:20 AM UTC  
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: None
Originator Name: Bryan PolingOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.4
Operating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


(Jump to the original submission Jump to the original submission)

Tue 30 Dec 2014 02:13:39 AM UTC, comment #8:

Thanks for debugging this. I changed the fix slightly. It now sets hidden_removal when the graphic object type is "line" and there are 3 dimensions (plot3). The changeset is here (http://hg.savannah.gnu.org/hgweb/octave/rev/9552138fe6f5). Closing report.

Rik <rik5>
Project Administrator
Mon 29 Dec 2014 10:36:58 PM UTC, comment #7:


here is the patch.


(file #32731)

Avinoam Kalma <avinoam>
Mon 29 Dec 2014 10:24:21 PM UTC, comment #6:

Apparently the patch failed to upload. Could you try again to attach the patch to this bug report?

Rik <rik5>
Project Administrator
Mon 29 Dec 2014 09:57:05 PM UTC, comment #5:


the bug is because of the "set hidden3d", in line 1413 of

Debugging this routing shows that the variable "hidden_removal"
is initialized as NaN, and in line 1413 is still NAN, so
"set hidden3d" is printed.
I think that the best fix is to initialize hidden_removal in
line 429 as false.
I have checked other 3D demos (trimesh, trisurf) and they are not
affected by this change.

Patch attached, please check.
this patch also solve bug 36926


Avinoam Kalma <avinoam>
Mon 07 Apr 2014 09:11:12 AM UTC, comment #4:


the bug is still not solved with the last release 3.8.1 (MS Windows).

Under the gnuplot toolkit, when drawing 3D lines, also the lower level command 'line' is affected from this bug. The result is lines that are plotted without taking into account any of the specified preferred colors. Therefore the first line is plotted in red, the next one in blue and so on... even if the user specifies a list of preferred colors. I confirm that this bug does not occur when plotting 2D lines.

I also confirm that this bug does not occur when using the fltk toolkit.

Luca <ldimicco>
Thu 01 Aug 2013 02:06:16 AM UTC, comment #3:

Indeed, on my system, if I use graphics_toolkit('fltk'), then colors are rendered correctly.

Thu 01 Aug 2013 02:00:09 AM UTC, comment #2:

Changing the category to reflect that this is only a problem for gnuplot.

Rik <rik5>
Project Administrator
Sun 28 Jul 2013 05:02:34 AM UTC, comment #1:

This is a bug in the use of Gnuplot bug.
On the current devel system the plot has the correct
color when using fltk

You could try:

Michael Godfrey <godfrey>
Sun 28 Jul 2013 03:58:20 AM UTC, original submission:

On my machine, the first time I use plot3 on a figure, the line will be red. If I then do "hold on" and use plot3 again, the next line will be blue. Next call gives light blue. The 4'th call gives yellow. Subsequent calls repeat this sequence. If I try to set the line color by passing '-b', '-r', '-g', etc. these options are ignored. Colors work as expected in 2D plots.

Run the following to reproduce this behavior:

hold on

Plot more lines, if desired and you should see the colors cycle.



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

Attach File(s):

Attached Files
file #32731:  hidden.patch added by avinoam (427B - application/octet-stream)


   bug dependencies.

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by avinoam (Posted a comment)
  • -unavailable- added by avinoam
  • -unavailable- added by ldimicco (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by godfrey (Posted a comment)
  • -unavailable- added by None (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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 30 Dec 2014 02:13:39 AM UTCrik5StatusDuplicate=>Fixed
    Mon 29 Dec 2014 10:36:58 PM UTCavinoamAttached File-=>Added hidden.patch, #32731
    Sun 28 Dec 2014 09:41:06 PM UTCavinoamCarbon-Copy-=>Added avinoam
    Sun 28 Dec 2014 03:51:53 PM UTCrik5StatusNone=>Duplicate
    Sun 28 Dec 2014 03:51:38 PM UTCrik5Dependencies-=>Depends on bugs #36926
    Thu 01 Aug 2013 02:00:09 AM UTCrik5CategoryPlotting=>Plotting with gnuplot
      Summaryplot3 ignores setting color through linespec=>plot3 ignores setting color through linespec with gnuplot

    Back to the top

    Powered by Savane 3.1-cleanup