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

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

[Octave-bug-tracker] [bug #49017] drawing grid uses RGBA color syntax in


From: Rik
Subject: [Octave-bug-tracker] [bug #49017] drawing grid uses RGBA color syntax incompatible with gnuplot 4.4
Date: Tue, 6 Sep 2016 22:48:57 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #3, bug #49017 (project octave):

Okay, this makes sense then.  In __gnuplot_draw_axes__.m, do_linestyle_command
()


function [style, ltidx] = do_linestyle_command (obj, linecolor, idx,
                                                plot_stream, errbars = "")
  idx = idx + 8;
  style = {};
  ltidx = [];

  if (__gnuplot_has_feature__ ("linetype"))
    scommand = "linetype";
  else
    scommand = "style line";
  endif
  fprintf (plot_stream, "set %s %d default;\n", scommand, idx);
  fprintf (plot_stream, "set %s %d", scommand, idx);

  found_style = false;
  if (isnumeric (linecolor))
    color = linecolor;
    if (isfield (obj, "alpha"))
      alphastr = sprintf ("%02x", round (255*(1-obj.alpha)));
    else
      alphastr = "";
    endif
    fprintf (plot_stream, " linecolor rgb \"#%s%02x%02x%02x\"",
             alphastr, round (255*color));
  else
    color = [0, 0, 0];
  endif


I guess there should be a __gnuplot_has_feature__ test for whether the RGBA
syntax is accepted.  If it isn't then alphastr should be the null string.

Just guessing, something like


    if (isfield (obj, "alpha") && __gnuplot_has_feature__ ("RGBA"))
      alphastr = sprintf ("%02x", round (255*(1-obj.alpha)));
    else
      alphastr = "";
    endif


Dan will know about this.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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