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

 
 

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

Submitter:  None
Submitted:  Sun 28 Jul 2013 03:58:20 AM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Bryan Poling Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.4
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
Mon 29 Dec 2014 10:36:58 PM UTC, comment #7: 

sorry.

here is the patch.

Avinoam


(file #32731)

Avinoam Kalma <avinoam>
Group Member
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>
Group administrator
Mon 29 Dec 2014 09:57:05 PM UTC, comment #5: 

Hi,

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

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

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

Hello,

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.

Anonymous
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>
Group 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:
graphics_toolkit('fltk')
....


Michael Godfrey <godfrey>
Group Member
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:

figure
plot3([0,1],[0,1],[0,1],'-b','linewidth',3);
hold on
plot3([1,0.5],[0,1],[0.5,0.5],'-b','linewidth',3);
plot3([0,-1],[0.8,-1],[-0.3,-1],'-b','linewidth',3);

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

Anonymous

 

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

Attach Files:
   
   
Comment:
   

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

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2014-12-30 rik5 StatusDuplicate Fixed
        Open/ClosedOpen Closed
    2014-12-29 avinoam Attached File- Added hidden.patch, #32731
    2014-12-28 avinoam Carbon-Copy- Added avinoam
    2014-12-28 rik5 StatusNone Duplicate
    2014-12-28 rik5 Dependencies- Depends on bugs #36926
    2013-08-01 rik5 CategoryPlotting 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.13-f8d8.
    Corresponding source code