octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #38666] imagesc prints garbled image for certa


From: anonymous
Subject: [Octave-bug-tracker] [bug #38666] imagesc prints garbled image for certain matrix sizes for sufficently large colormap size
Date: Fri, 05 Apr 2013 16:56:51 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:19.0) Gecko/20100101 Firefox/19.0

URL:
  <http://savannah.gnu.org/bugs/?38666>

                 Summary: imagesc prints garbled image for certain matrix
sizes for sufficently large colormap size
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Fri 05 Apr 2013 04:56:49 PM UTC
                Category: Plotting
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: John Schneeloch
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.6.4
        Operating System: Mac OS

    _______________________________________________________

Details:

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.) 


# generate image data
nsize = 103;
x = 1:nsize;
y = 1:nsize;
z = x'*x + y'*y;
                
imagesc(z)
ncolors = 257;
cmap = jet(ncolors);
colormap(cmap);

print('./test1.png', '-dpng')





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?38666>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]