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

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

[Octave-bug-tracker] [bug #43890] gnuplot patch coloring not identical t


From: Rik
Subject: [Octave-bug-tracker] [bug #43890] gnuplot patch coloring not identical to FLTK or Matlab
Date: Fri, 26 Dec 2014 03:47:24 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0

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

                 Summary: gnuplot patch coloring not identical to FLTK or
Matlab
                 Project: GNU Octave
            Submitted by: rik5
            Submitted on: Thu 25 Dec 2014 07:47:22 PM PST
                Category: Plotting with gnuplot
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

The patch colors are not always correct.  Here is one example:


graphics_toolkit gnuplot
demo ("patch", 6);
colormap (jet (4));
view (318, 75);


I've attached screen snapshots of the results under both gnuplot and FLTK. 
You can't use print to produce the images because the print version from
gnuplot is correct.

Octave is doing something very tricky with the colormap that it sends to
gnuplot.  The code to modify will be in __go_draw_axes__.m.  The snapshot I
took has a colorbar from gnuplot because I commented out this line in
__go_draw_axes__.m:


#  fputs (plot_stream, "unset colorbox;\n");


As one can see, the colormap is doubled (8 entries) rather than the 4 that it
would normally have.

The code immediately before this line is adding extra entries to the cmap for
an unknown reason.  See below.


cmap = [cmap; addedcmap];
cmap_sz = cmap_sz + rows (addedcmap);

if (length (cmap) > 0)
  fprintf (plot_stream,
           "set palette positive color model RGB maxcolors %i;\n",
           cmap_sz);
  fprintf (plot_stream,
           "set palette file \"-\" binary record=%d using 1:2:3:4;\n",
           cmap_sz);
  fwrite (plot_stream, [1:cmap_sz; cmap.'], "float32");
  fwrite (plot_stream, "\n");
endif






    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 25 Dec 2014 07:47:22 PM PST  Name: demo6_gnuplot.png  Size: 44kB  
By: rik5

<http://savannah.gnu.org/bugs/download.php?file_id=32714>
-------------------------------------------------------
Date: Thu 25 Dec 2014 07:47:22 PM PST  Name: demo6_fltk.png  Size: 17kB   By:
rik5

<http://savannah.gnu.org/bugs/download.php?file_id=32715>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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