bugGNU Octave - Bugs: bug #38666, imagesc prints garbled image for...


bug #38666: imagesc prints garbled image for certain matrix sizes for sufficently large colormap size

Submitted by:  None
Submitted on:  Fri 05 Apr 2013 04:56:49 PM UTC  
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: John SchneelochOriginator Email: -unavailable-
Open/Closed: OpenRelease: 3.6.4
Operating System: Any

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


Sun 07 Apr 2013 06:22:16 PM UTC, comment #3:

The result is confirmed. It is definitely a problem with the interaction with gnuplot--the FLTK backend seems to work just fine. I tried Octave versions 3.6.4 and a recent development tip as well as gnuplot versions 4.4.3 and 4.6.2.

Rik <rik5>
Project Administrator
Sun 07 Apr 2013 05:10:01 AM UTC, comment #2:

I've attached garbled and non-garbled versions of the plot for nsize = 99 and ncolors = 257 for the garbled version, ncolors=256 for the non-garbled one. (I think I reported the direction of the gradient in the wrong direction, by the way.) According to the graphics_toolkit command, I'm using gnuplot.

(file #27799, file #27800)

Sat 06 Apr 2013 12:02:12 AM UTC, comment #1:

Can you upload the generated png file that is in error so we can take a look at it. Also, are you using gnuplot or FLTK for plotting? That also makes a big difference.

Rik <rik5>
Project Administrator
Fri 05 Apr 2013 04:56:49 PM UTC, original submission:

While making plots using imagesc, I ran into this weird bug. Sometimes the image displays fine in AquaTerm but the plot saved with the "print" command produces a garbled output. Below is the simplest example I could come up with, which displays a rainbow gradient (red in the lower right corner to blue in the upper left), but when saved produces a png file with red horizontal bands crossing the image, blue speckles, and pieces of the image displaying in the wrong locations. As far as I can tell, the result is garbled only for ncolors (the number of colors in the colormap) greater than 256, and only for certain nsize values (e.g., 103 is bad, 100-102 are fine, 99 is bad, etc.)



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

Attach File(s):

Attached Files
file #27799:  garbled.png added by None (17kB - image/png)
file #27800:  notgarbled.png added by None (21kB - image/png)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by rik5
  • -unavailable- added by rik5 (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 07 Apr 2013 06:22:16 PM UTCrik5CategoryPlotting=>Plotting with gnuplot
      StatusNeed Info=>Confirmed
      Operating SystemMac OS=>Any
      Carbon-Copy-=>Added -unavailable-
    Sun 07 Apr 2013 05:10:01 AM UTCNoneAttached File-=>Added garbled.png, #27799
      Attached File-=>Added notgarbled.png, #27800
    Sat 06 Apr 2013 12:02:12 AM UTCrik5StatusNone=>Need Info

    Back to the top

    Powered by Savane 3.1-cleanup