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

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

[Octave-bug-tracker] [bug #52599] gnuplot shows shaded images with imsho


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #52599] gnuplot shows shaded images with imshow
Date: Wed, 6 Dec 2017 18:05:12 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #5, bug #52599 (project octave):

Yeah this could be a case of a change in gnuplot.  I'm using the development
version 5.3.0.

There is this other bug report from a month or so ago:

https://savannah.gnu.org/bugs/?52401

at which point I looked into what was going on with gnuplot.  gnuplot made a
change without too much discussion about syntax.  Typically gnuplot is very
conservative about changing syntax.  Rather than autoscaling to determine
range, gnuplot now has this "rgbmax" variable:


gnuplot> help rgbmax
 Syntax:
      set rgbmax {1.0 | 255}
      unset rgbmax
 The red/green/blue color components of an rgbimage plot are by default
 interpreted as integers in the range [0:255].  `set rgbmax 1.0` tells the
 program that data values used to generate the color components of a plot
 with `rgbimage` or `rgbalpha` are floating point values in the range [0:1].
 `unset rgbmax` returns to the default integer range [0:255].


If anything, I wish the syntax change would have been "set rgbrange [0:255]"
which would have been fully consistent with other range settings in gnuplot.

Nonetheless, gnuplot now has 0 to 255 as the default range and that is
probably why this comes up now.

The good thing is that I just went back to the example of
https://savannah.gnu.org/bugs/?52401 and changing the color map size to 256


octave:1> I=uint8(zeros(16,16,3));
octave:2> for i=1:16; I(i,:,1)=i*16-1; end
octave:3> for i=1:16; I(:,i,2)=i*16-1; end
octave:4> for i=1:16; I(:,i,3)=[i-1:15,0:i-2]*16+15; end
octave:5> imshow(I)
octave:6> colormap(jet(256))


appears to correct the image darkness.  So, I'd say if the changeset has no
affect on your result with gnuplot 5.0.3 (because that is using autoscaling),
then it would be a good fix for the issue without using gnuplot's new "rgbmax"
syntax.  We could then close this bug report and
https://savannah.gnu.org/bugs/?52401

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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