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

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

[Octave-bug-tracker] [bug #48401] gnuplot gridlinestyle property overrid


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #48401] gnuplot gridlinestyle property overrides minorgridlinestyle propery
Date: Wed, 6 Jul 2016 23:11:14 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0

Follow-up Comment #13, bug #48401 (project octave):

I saw that Matlab called this "transparency" but didn't see the description of
which extreme is what.  I just assumed a positive correlation between the
number and "transparency".  But I suppose the 0.15 default makes more sense
when viewed as being nearer to transparent for a grid line.

It's a simple change of


-      alphastr = sprintf ("%02x", round (255*obj.alpha));
+      alphastr = sprintf ("%02x", round (255*(1-obj.alpha)));


and works as expected.

However, there is a problem here, and this may have been what confused me. 
With these default property settings:


    gridalpha =  0.15000
    gridcolor =

       0.15000   0.15000   0.15000

    gridlinestyle = :



    minorgridalpha =  0.25000
    minorgridcolor =

       0.10000   0.10000   0.10000

    minorgridlinestyle = :


the grid lines (major or minor) aren't visible.  If the gridlinestyle is '-',
i.e., solid, then the alpha/color combination works OK.  Should that be the
default linestyle for "grid on"?  Dots (':') is OK when the lines are nearer
to opaque.

Another aspect of this is the difference between gnuplot (alpha implemented)
and qt/fltk (no alpha implemented).  Compare the following:


for tk = {'gnuplot', 'qt', 'fltk'}
  graphics_toolkit (tk{});
  figure;
  plot (1:10); grid on;
  set(gca, 'gridlinestyle', '-');
endfor


Even though qt/fltk can't do true alpha blending, perhaps it should simply
multiply the grid color channels by 1-alpha to get something close to the same
affect as alpha blending.

(file #37742)
    _______________________________________________________

Additional Item Attachment:

File name: octave-gnuplot_invert_alpha-bug48401-djs2016jul06.patch Size:0 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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