bugGNU Octave - Bugs: bug #52401, color images too dark wth...


bug #52401: color images too dark wth graphics_toolkit gnuplot

Submitted by:  None
Submitted on:  Mon 13 Nov 2017 05:10:48 PM UTC  
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  R.S:Carmenes Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.2.0
Operating System:  GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

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


Thu 07 Dec 2017 06:50:11 PM UTC, comment #4:

This bug should be fixed by the patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/d8626fd6bb36) that also fixed bug #52599.

It will be part of the 4.2.2 bug fix release scheduled for the end of this year.

Rik <rik5>
Project Administrator
Mon 20 Nov 2017 07:59:23 PM UTC, comment #3:

Sorry for the delay on addressing this. I got to discussing this with the gnuplot developers, and the alteration and syntax chosen for gnuplot seemed clumsy so I guess I was hoping they'd see the sense in making syntax consistent, thereby avoiding changing something just to change it again a year from now. This gnuplot mod has me wondering.

Dan Sebald <sebald>
Fri 17 Nov 2017 09:37:24 PM UTC, comment #2:

The attached naif patch may be useful for those interested in showing or printing color images using graphics_toolkit gnuplot 5.2 and later until a proper patch is prepared by the developers. It works for me but I did not test it that much and cannot tell if this might have unexpected side-effects.


(file #42418)

Mon 13 Nov 2017 05:52:56 PM UTC, comment #1:

Thanks for looking into the source of the problem. I'll inquire with gnuplot developers why the change then come up with a patch to apply. The easiest solution might be to just add autoscaling to Octave, which would work for older and newer gnuplot, I think.

Dan Sebald <sebald>
Mon 13 Nov 2017 05:10:48 PM UTC, original submission:


Color images are far too dark when shown and exported using graphics_toolkit gnuplot. This equally affects imshow and imagesc, as well as any subsequent print, at least with octave 4.0.3 to 4.2.1, and with gnuplot 5.2.0 or later, including the current cvs version. However, colors are correctly shown with gnuplot 5.0.7 or earlier. Gray and B&W images are unaffected.

The following code reproduces the problem and generates a gnuplot file for testing.

After investigating, all this is due to the change introduced in gnuplot 5.2.0 regarding the use of cbrange. See the gnuplot ChangeLog:

Currently, octave uses set cbrange [1:64]; but this has no effect on rgb images since gnuplot 5.2, resulting in dark color images with any output device when handled through the gnuplot engine. Therefore octave should be updated to cope with the new gnuplot specifications.

The fltk graphics toolkit shows color images correctly but seems unable to export them, so it is not (yet) a valid solution (at least for me).

Hope this can be fixed.




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

Attach Files:

Attached Files
file #42418:  gnucolor.patch added by None (492B - text/x-patch)


Depends on the following items: None found

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 sebald (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-12-07 rik5 StatusNone => Fixed
        Open/ClosedOpen => Closed
    2017-11-17 None Attached File- => Added gnucolor.patch, #42418

    Back to the top

    Powered by Savane 3.3