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

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

[Octave-bug-tracker] [bug #52624] gnuplot toolkit binary image is only b


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #52624] gnuplot toolkit binary image is only black pixels
Date: Tue, 12 Dec 2017 23:24:32 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #6, bug #52624 (project octave):

Oh, interesting, never knew copyobj existed, thanks.

I isolated the graph with the problem.  It is an issue with that zero clim
range (i.e., clim(1) == clim(2)).  This scatter demo is using a clim mode of
auto, which means clim(1) and clim(2) are the same when there is only a single
color.  Attached is a patch that fixes this.  I also changed the case where
there is a clim range of zero for TrueColor, but I don't think that ever
occurs; higher level code rules out such a combination.

Here are some scripts to test (since it dividing by two I figured I should try
even and odd colormap sizes):


close all
m=1;
n=1;
x = rand (n, 1);
y = rand (n, 1);
colors = rand (n, m);
graphics_toolkit fltk
scatter (x, y, [], colors, "filled");
set(gca, 'ColorMap', jet(4));
graphics_toolkit gnuplot
figure
scatter (x, y, [], colors, "filled");
set(gca, 'ColorMap', jet(4));

close all
m=1;
n=1;
x = rand (n, 1);
y = rand (n, 1);
colors = rand (n, m);
graphics_toolkit fltk
scatter (x, y, [], colors, "filled");
set(gca, 'ColorMap', jet(3));
graphics_toolkit gnuplot
figure
scatter (x, y, [], colors, "filled");
set(gca, 'ColorMap', jet(3));

close all
m=1;
n=1;
x = rand (n, 1);
y = rand (n, 1);
colors = rand (n, m);
graphics_toolkit fltk
scatter (x, y, [], colors, "filled");
set(gca, 'ColorMap', jet(1));
graphics_toolkit gnuplot
figure
scatter (x, y, [], colors, "filled");
set(gca, 'ColorMap', jet(1));


I figured I should try a colormap size of one and that revealed gnuplot
doesn't like a zero colorbox range.  In such a case I forced it to two and it
seems to produce the desired result, so there we go.

(file #42631)
    _______________________________________________________

Additional Item Attachment:

File name: octave-gnuplot_zero_color_autorange-djs2017dec12.patch Size:1 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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